* Resolve $device (e.g. from /dev/disk/by-label/foo -> /dev/sda2),

because /proc/swaps contains resolved paths as well.  Without this,
  the swap device will be turned off again by the $unused code.

svn path=/nixos/trunk/; revision=19278
This commit is contained in:
Eelco Dolstra 2010-01-06 22:41:59 +00:00
parent ec3398e4b2
commit ed7d096624

View File

@ -91,6 +91,7 @@ in
device="${config.device}"
''
}
device=$(readlink -f "$device")
# Add new swap devices.
if echo $unused | grep -q "^$device\$"; then
unused="$(echo $unused | grep -v "^$device\$")"