From 026c31dd9d6570fc6d7475c0102745cbfb0d6972 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Thu, 30 Jul 2015 16:29:38 -0500 Subject: [PATCH] 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) --- nixos/modules/system/boot/stage-1-init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh index 26cf7f06c9e..480bbfa2b07 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