fix(mkfs): trim template whitespace; add changelog; add contributor

Signed-off-by: kosmolito <said.karker@gmail.com>
This commit is contained in:
kosmolito
2025-11-05 21:00:42 +00:00
committed by Jonathon Anderson
parent 0c15c10515
commit 7842f41f62
4 changed files with 7 additions and 5 deletions

View File

@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## v4.6.5, unreleased
- Fixed mkfs overlay overwrite/force-flag behavior. #2028.
### Added
- `wwclient.aarch64` overlay always provides an aarch64 wwclient executable.

View File

@@ -49,4 +49,4 @@
* Arian Cabrera [@acabrera86](https://github.com/acabrera86)
* Dacian Reece-Stremtan <dacianstremtan@gmail.com> [@dacianstremtan](https://github.com/dacianstremtan)
* Adrian Reber <areber@redhat.com>
* Karker Said <said.karker@gmail.com>
* Karker Said <said.karker@gmail.com> [@kosmolito](https://github.com/kosmolito)

View File

@@ -105,13 +105,13 @@ already_formatted() {
if command -v mkfs >/dev/null ; then :
if false || ! already_formatted /dev/disk/by-partlabel/rootfs; then
info "warewulf: mkfs: formatting /dev/disk/by-partlabel/rootfs"
mkfs --type=ext4 /dev/disk/by-partlabel/rootfs || die "warewulf: mkfs: failed to format /dev/disk/by-partlabel/rootfs"
mkfs --type=ext4 /dev/disk/by-partlabel/rootfs || die "warewulf: mkfs: failed to format /dev/disk/by-partlabel/rootfs"
else
info "warewulf: mkfs: skipping /dev/disk/by-partlabel/rootfs"
fi
if true || ! already_formatted /dev/disk/by-partlabel/scratch; then
info "warewulf: mkfs: formatting /dev/disk/by-partlabel/scratch"
mkfs --type=ext4 -F /dev/disk/by-partlabel/scratch || die "warewulf: mkfs: failed to format /dev/disk/by-partlabel/scratch"
mkfs --type=ext4 -F /dev/disk/by-partlabel/scratch || die "warewulf: mkfs: failed to format /dev/disk/by-partlabel/scratch"
else
info "warewulf: mkfs: skipping /dev/disk/by-partlabel/scratch"
fi
@@ -171,7 +171,7 @@ already_formatted() {
if command -v mkfs >/dev/null ; then :
if false || ! already_formatted /dev/disk/by-partlabel/rootfs; then
info "warewulf: mkfs: formatting /dev/disk/by-partlabel/rootfs"
mkfs --type=ext4 /dev/disk/by-partlabel/rootfs || die "warewulf: mkfs: failed to format /dev/disk/by-partlabel/rootfs"
mkfs --type=ext4 /dev/disk/by-partlabel/rootfs || die "warewulf: mkfs: failed to format /dev/disk/by-partlabel/rootfs"
else
info "warewulf: mkfs: skipping /dev/disk/by-partlabel/rootfs"
fi

View File

@@ -65,7 +65,7 @@ if command -v mkfs >/dev/null ; then :
{{- $forceFlag = "-f" }}
{{- end }}
{{- end }}
mkfs {{ not (empty $fs.type) | ternary (print "--type=" $fs.type) "" }} {{ not (empty $fs.label) | ternary (print "-L " $fs.label) "" }} {{ not (empty $fs.uuid) | ternary (print "-U " $fs.uuid) "" }} {{ default "" $fs.options }} {{ $forceFlag }} {{ $fs.device }} {{ default "" $fs.size }} || die "warewulf: mkfs: failed to format {{ $fs.device }}"
mkfs {{ not (empty $fs.type) | ternary (print "--type=" $fs.type) "" }} {{ not (empty $fs.label) | ternary (print "-L " $fs.label) "" }} {{ not (empty $fs.uuid) | ternary (print "-U " $fs.uuid) "" }} {{ default "" $fs.options }} {{ not (empty $forceFlag) | ternary (print $forceFlag) "" }} {{ $fs.device }} {{ default "" $fs.size }} || die "warewulf: mkfs: failed to format {{ $fs.device }}"
else
info "warewulf: mkfs: skipping {{ $fs.device }}"
fi