diff options
author | Harald van Dijk <harald@gigawatt.nl> | 2015-02-13 10:20:29 +0000 |
---|---|---|
committer | Harald van Dijk <harald@gigawatt.nl> | 2015-02-13 10:20:29 +0000 |
commit | 0fe9d58e4ef739bc361a3d9acb3dd912dad485d2 (patch) | |
tree | 8cd94dcf04748a18afb2038036f2eb6e0ba34427 /nixos/modules/system | |
parent | 92f3ec3ba5761d00138a439787948c7a17935c3c (diff) | |
download | nixpkgs-0fe9d58e4ef739bc361a3d9acb3dd912dad485d2.tar nixpkgs-0fe9d58e4ef739bc361a3d9acb3dd912dad485d2.tar.gz nixpkgs-0fe9d58e4ef739bc361a3d9acb3dd912dad485d2.tar.bz2 nixpkgs-0fe9d58e4ef739bc361a3d9acb3dd912dad485d2.tar.lz nixpkgs-0fe9d58e4ef739bc361a3d9acb3dd912dad485d2.tar.xz nixpkgs-0fe9d58e4ef739bc361a3d9acb3dd912dad485d2.tar.zst nixpkgs-0fe9d58e4ef739bc361a3d9acb3dd912dad485d2.zip |
stage-1-init: fix PID 1 shell
The PID 1 shell is executed as the last command in a sh invocation. Some shells implicitly use exec for that, but the current busybox ash does not, so the shell gets a wrong PID. Spell out the exec.
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 8f185217c3f..1e173f5ac7a 100644 --- a/nixos/modules/system/boot/stage-1-init.sh +++ b/nixos/modules/system/boot/stage-1-init.sh @@ -36,7 +36,7 @@ EOF read reply if [ -n "$allowShell" -a "$reply" = f ]; then - exec setsid @shell@ -c "@shell@ < /dev/$console >/dev/$console 2>/dev/$console" + exec setsid @shell@ -c "exec @shell@ < /dev/$console >/dev/$console 2>/dev/$console" elif [ -n "$allowShell" -a "$reply" = i ]; then echo "Starting interactive shell..." setsid @shell@ -c "@shell@ < /dev/$console >/dev/$console 2>/dev/$console" || fail |