From 3d4b6257d666149991a4c718601bd834cf100b79 Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 28 Oct 2016 22:50:44 +0200 Subject: [PATCH] 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 --- nixos/modules/system/boot/stage-1-init.sh | 3 +-- 1 file changed, 1 insertion(+), 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