summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorSpencer Janssen <spencerjanssen@gmail.com>2015-07-30 16:29:38 -0500
committerVladimír Čunát <vcunat@gmail.com>2015-07-31 08:49:38 +0200
commit026c31dd9d6570fc6d7475c0102745cbfb0d6972 (patch)
tree1a0a2ac67958e145b70fa214d848a05f1067a870 /nixos/modules
parentbc1773fe16dbb1bf1e9cf0808675f6ee24b321f2 (diff)
downloadnixlib-026c31dd9d6570fc6d7475c0102745cbfb0d6972.tar
nixlib-026c31dd9d6570fc6d7475c0102745cbfb0d6972.tar.gz
nixlib-026c31dd9d6570fc6d7475c0102745cbfb0d6972.tar.bz2
nixlib-026c31dd9d6570fc6d7475c0102745cbfb0d6972.tar.lz
nixlib-026c31dd9d6570fc6d7475c0102745cbfb0d6972.tar.xz
nixlib-026c31dd9d6570fc6d7475c0102745cbfb0d6972.tar.zst
nixlib-026c31dd9d6570fc6d7475c0102745cbfb0d6972.zip
stage-1: fix typo that breaks resume
$d should be $sd, this causes resume from hibernate to fail if
resumeDevice is not explicitly set in config.  Introduced in commit:
'stage-1: Shut up warnings about swap devices that don't exist yet'

(cherry picked from commit 2a31397f536b3bf57e4ee76b812fd83ab31de971)
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/system/boot/stage-1-init.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh
index 26cf7f06c9ed..480bbfa2b07b 100644
--- a/nixos/modules/system/boot/stage-1-init.sh
+++ b/nixos/modules/system/boot/stage-1-init.sh
@@ -184,7 +184,7 @@ if test -e /sys/power/resume -a -e /sys/power/disk; then
             # https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/923326/comments/1
             # when there are multiple swap devices, we can't know where the hibernate
             # image will reside. We can check all of them for swsuspend blkid.
-            resumeInfo="$(test -e "$d" && udevadm info -q property "$sd")"
+            resumeInfo="$(test -e "$sd" && udevadm info -q property "$sd")"
             if [ "$(echo "$resumeInfo" | sed -n 's/^ID_FS_TYPE=//p')" = "swsuspend" ]; then
                 resumeDev="$sd"
                 break