forked from mirrors/nixpkgs
* grep returns a non-zero exit code if no line matches, causing the
swap task to fail. So ignore that. svn path=/nixos/trunk/; revision=19660
This commit is contained in:
parent
32995b3d36
commit
442093d27d
|
@ -94,7 +94,7 @@ in
|
|||
device=$(readlink -f "$device")
|
||||
# Add new swap devices.
|
||||
if echo $unused | grep -q "^$device\$"; then
|
||||
unused="$(echo $unused | grep -v "^$device\$")"
|
||||
unused="$(echo $unused | grep -v "^$device\$" || true)"
|
||||
else
|
||||
${utillinux}/sbin/swapon "$device" || true
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue