Make mkfs -f/-F flag selection more explicit
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -37,7 +37,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
### Removed
|
||||
|
||||
- Remove unused Netdev `Prefix` field.
|
||||
- Fixed mkfs overlay overwrite/force-flag behavior. #2028.
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -46,6 +45,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Fix ImageDelete API not returning error when checking if image is used by nodes/profiles
|
||||
- Fix warewulf-dracut to not run the wwinit module if root is not set to `root=wwclient*`
|
||||
- Fix `wwctl image import --update` #2066
|
||||
- Fix filesystem overwrite/force behavior in mkfs overlay. #2028
|
||||
|
||||
### Dependencies
|
||||
|
||||
|
||||
@@ -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