stage-1: Shut up warnings about swap devices that don't exist yet

(cherry picked from commit 388dac478d)
This commit is contained in:
Eelco Dolstra 2015-05-11 17:32:53 +02:00
parent ec82157ac5
commit 0ab320a884

View File

@ -182,9 +182,9 @@ if test -e /sys/power/resume -a -e /sys/power/disk; then
for sd in @resumeDevices@; do for sd in @resumeDevices@; do
# Try to detect resume device. According to Ubuntu bug: # Try to detect resume device. According to Ubuntu bug:
# https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/923326/comments/1 # 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 # when there are multiple swap devices, we can't know where the hibernate
# image reside. We can check all of them for swsuspend blkid. # image will reside. We can check all of them for swsuspend blkid.
resumeInfo="$(udevadm info -q property "$sd" )" resumeInfo="$(test -e "$d" && udevadm info -q property "$sd")"
if [ "$(echo "$resumeInfo" | sed -n 's/^ID_FS_TYPE=//p')" = "swsuspend" ]; then if [ "$(echo "$resumeInfo" | sed -n 's/^ID_FS_TYPE=//p')" = "swsuspend" ]; then
resumeDev="$sd" resumeDev="$sd"
break break