Make mkfs -f/-F flag selection more explicit
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -59,9 +59,9 @@ if command -v mkfs >/dev/null ; then :
|
||||
info "warewulf: mkfs: formatting {{ $fs.device }}"
|
||||
{{- $forceFlag := "" }}
|
||||
{{- if $fs.overwrite }}
|
||||
{{- if eq $fs.type "ext4" }}
|
||||
{{- if regexMatch "^ext[234]$" $fs.type }}
|
||||
{{- $forceFlag = "-F" }}
|
||||
{{- else }}
|
||||
{{- else if regexMatch "^(xfs|btrfs)$" $fs.type }}
|
||||
{{- $forceFlag = "-f" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user