mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
* 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 New Issue
Block a user