From d86395db78fccd6c0d047ac987e05c3a9de2dcf7 Mon Sep 17 00:00:00 2001 From: Madoura Date: Tue, 9 Jan 2024 07:46:30 -0600 Subject: [PATCH] nixos/stage-1.init.sh: only set 'IFS' in 'waitDevice' for bcachefs --- nixos/modules/system/boot/stage-1-init.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh index 72c670bcaed0..59cf1a47fb7f 100644 --- a/nixos/modules/system/boot/stage-1-init.sh +++ b/nixos/modules/system/boot/stage-1-init.sh @@ -88,7 +88,12 @@ waitDevice() { local device="$1" # Split device string using ':' as a delimiter, bcachefs uses # this for multi-device filesystems, i.e. /dev/sda1:/dev/sda2:/dev/sda3 - local IFS=':' + local IFS + + # bcachefs is the only known use for this at the moment + # Preferably, the 'UUID=' syntax should be enforced, but + # this is kept for compatibility reasons + if [ "$fsType" = bcachefs ]; then IFS=':'; fi # USB storage devices tend to appear with some delay. It would be # great if we had a way to synchronously wait for them, but