From ba31749458d8b6179768888aeb1194c3114ac902 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Wed, 24 Sep 2014 20:00:51 +0400 Subject: [PATCH] stage-1: Use udevadm instead of blkid --- 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 beaad8d657d..f14f105ef23 100644 --- a/nixos/modules/system/boot/stage-1-init.sh +++ b/nixos/modules/system/boot/stage-1-init.sh @@ -177,7 +177,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 will hibernate # image reside. We can check all of them for swsuspend blkid. - if [ "$(blkid -o value -s TYPE "$sd")" = "swsuspend" ]; then + if [ "$(udevadm info -q property "$sd" | sed -n 's/^ID_FS_TYPE=//p')" = "swsuspend" ]; then resumeDev="$sd" break fi