* 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:
parent
ec3398e4b2
commit
ed7d096624
@ -91,6 +91,7 @@ in
|
|||||||
device="${config.device}"
|
device="${config.device}"
|
||||||
''
|
''
|
||||||
}
|
}
|
||||||
|
device=$(readlink -f "$device")
|
||||||
# Add new swap devices.
|
# Add new swap devices.
|
||||||
if echo $unused | grep -q "^$device\$"; then
|
if echo $unused | grep -q "^$device\$"; then
|
||||||
unused="$(echo $unused | grep -v "^$device\$")"
|
unused="$(echo $unused | grep -v "^$device\$")"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user