From 07f46bea64f02bd2e40934a2017f9a272e52983a Mon Sep 17 00:00:00 2001 From: Josh Hoffer Date: Thu, 21 Nov 2024 11:25:36 -0800 Subject: [PATCH] nixos/stage-1.init.sh: remove trailing , from mount options --- nixos/modules/system/boot/stage-1-init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh index 23e9df2189e7..d803106d75be 100644 --- a/nixos/modules/system/boot/stage-1-init.sh +++ b/nixos/modules/system/boot/stage-1-init.sh @@ -392,7 +392,7 @@ mountFS() { # Filter out x- options, which busybox doesn't do yet. local optionsFiltered="$(IFS=,; for i in $options; do if [ "${i:0:2}" != "x-" ]; then echo -n $i,; fi; done)" # Prefix (lower|upper|work)dir with /mnt-root (overlayfs) - local optionsPrefixed="$( echo "$optionsFiltered" | sed -E 's#\<(lowerdir|upperdir|workdir)=#\1=/mnt-root#g' )" + local optionsPrefixed="$( echo "${optionsFiltered%,}" | sed -E 's#\<(lowerdir|upperdir|workdir)=#\1=/mnt-root#g' )" echo "$device /mnt-root$mountPoint $fsType $optionsPrefixed" >> /etc/fstab