summary refs log tree commit diff
path: root/nixos/modules/system/boot/stage-1-init.sh
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-10-28 22:50:44 +0200
committeraszlig <aszlig@redmoonstudios.org>2016-10-28 22:50:44 +0200
commit3d4b6257d666149991a4c718601bd834cf100b79 (patch)
tree20d4c3a67f97bf3f49432383352681e5dc1479e1 /nixos/modules/system/boot/stage-1-init.sh
parent9ab271a4be273ba17821fa178c47433178a946a4 (diff)
downloadnixpkgs-3d4b6257d666149991a4c718601bd834cf100b79.tar
nixpkgs-3d4b6257d666149991a4c718601bd834cf100b79.tar.gz
nixpkgs-3d4b6257d666149991a4c718601bd834cf100b79.tar.bz2
nixpkgs-3d4b6257d666149991a4c718601bd834cf100b79.tar.lz
nixpkgs-3d4b6257d666149991a4c718601bd834cf100b79.tar.xz
nixpkgs-3d4b6257d666149991a4c718601bd834cf100b79.tar.zst
nixpkgs-3d4b6257d666149991a4c718601bd834cf100b79.zip
nixos/stage1: Fix local keyword outside function
Thanks to @NeQuissimus in a5c1985fef381b1fb5d75d3b4028ed5b5d4454b3 for
updating busybox, which since version 1.25 doesn't allow local variables
outside of functions anymore (which is the desired behaviour).

See the following upstream commit of busybox which is the change that
let's this problem surface:

https://git.busybox.net/busybox/commit/?id=ef2386b80abfb22ccb697ddbdd4047aacc395c50

So this has been an error I've made on my end in
67223ee205364afb203361b134f16b890c4d726c, because I originally had a
function for killing the processes but desired to inline it because it's
only used in one place.

This fixes the boot-stage1 NixOS test.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/modules/system/boot/stage-1-init.sh')
-rw-r--r--nixos/modules/system/boot/stage-1-init.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh
index abab5f20baa..7803f1bd1aa 100644
--- a/nixos/modules/system/boot/stage-1-init.sh
+++ b/nixos/modules/system/boot/stage-1-init.sh
@@ -498,8 +498,7 @@ eval "exec $logOutFd>&- $logErrFd>&-"
 #
 # Storage daemons are distinguished by an @ in front of their command line:
 # https://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons/
-local pidsToKill="$(pgrep -v -f '^@')"
-for pid in $pidsToKill; do
+for pid in $(pgrep -v -f '^@'); do
     # Make sure we don't kill kernel processes, see #15226 and:
     # http://stackoverflow.com/questions/12213445/identifying-kernel-threads
     readlink "/proc/$pid/exe" &> /dev/null || continue