diff options
author | Linus Heckemann <git@sphalerite.org> | 2019-04-18 17:59:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-18 17:59:08 +0200 |
commit | 42c107c2aa7200d690b3bec53715c0bc607f4221 (patch) | |
tree | 982605cdf6d9deba44b793ea49d214dc597a8a46 /nixos/modules/system | |
parent | 02b59817e7218c60772c13a9aac674fe74146962 (diff) | |
parent | 817369d4c1c5abaf792827a4770e513e115f8644 (diff) |
Merge pull request #49537 from mayflower/stage1-symlink-fix
nixos stage-1: fix init existence test
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/stage-1-init.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh index 6dafc6cddde7..67cbe720ddc3 100644 --- a/nixos/modules/system/boot/stage-1-init.sh +++ b/nixos/modules/system/boot/stage-1-init.sh @@ -555,7 +555,7 @@ echo /sbin/modprobe > /proc/sys/kernel/modprobe # Start stage 2. `switch_root' deletes all files in the ramfs on the # current root. Note that $stage2Init might be an absolute symlink, # in which case "-e" won't work because we're not in the chroot yet. -if ! test -e "$targetRoot/$stage2Init" -o ! -L "$targetRoot/$stage2Init"; then +if [ ! -e "$targetRoot/$stage2Init" ] && [ ! -L "$targetRoot/$stage2Init" ] ; then echo "stage 2 init script ($targetRoot/$stage2Init) not found" fail fi |