Merge pull request #49537 from mayflower/stage1-symlink-fix

nixos stage-1: fix init existence test
This commit is contained in:
Linus Heckemann 2019-04-18 17:59:08 +02:00 committed by GitHub
commit 42c107c2aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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