nixos/stage1: Fix local keyword outside function

Thanks to @NeQuissimus in a5c1985fef 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
67223ee205, 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>
This commit is contained in:
aszlig 2016-10-28 22:50:44 +02:00
parent 9ab271a4be
commit 3d4b6257d6
No known key found for this signature in database
GPG Key ID: 1DE8E48E57DB5436

View File

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