From ed7d09662471d32f86eac72215a0b3c58031f026 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 6 Jan 2010 22:41:59 +0000 Subject: [PATCH] * 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 --- modules/tasks/swap.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/tasks/swap.nix b/modules/tasks/swap.nix index 066914a3e43..333cf674c07 100644 --- a/modules/tasks/swap.nix +++ b/modules/tasks/swap.nix @@ -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\$")"