Applied patch for UUID support for real_resume= from gentoo bug #239687
authorAndrew Gaffney <agaffney@gentoo.org>
Sat, 15 Nov 2008 16:04:29 +0000 (10:04 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Sat, 15 Nov 2008 16:04:29 +0000 (10:04 -0600)
ChangeLog
defaults/linuxrc

index 792716895f5672f09614827121272e85f71ad8da..5c93c1c4915b650bc813340e39efdc209b27f3d4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
 # Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney
 # Distributed under the GPL v2
 
+  15 Nov 2008; Andrew Gaffney <agaffney@gentoo.org> defaults/linuxrc:
+  Applied patch for UUID support for real_resume= from gentoo bug #239687
+
   15 Nov 2008; Andrew Gaffney <agaffney@gentoo.org> gen_determineargs.sh:
   Added modified version of patch from gentoo bug #238707
 
index d5e287029699e084056164bf7b8f58b77ed15481..4dd1b7c51ec0d51984c3efc771cb9017d65b960d 100644 (file)
@@ -273,6 +273,34 @@ then
        startLUKS
        if [ "${NORESUME}" != '1' ] && [ -n "${REAL_RESUME}" ]
        then
+               case "${REAL_RESUME}" in
+                       LABEL\=*|UUID\=*)
+
+                               RESUME_DEV=""
+                               retval=1
+                               
+                               if [ "${retval}" -ne '0' ]; then
+                                       RESUME_DEV=`findfs "${REAL_RESUME}" 2>/dev/null`
+                                       retval=$?
+                               fi
+                               
+                               if [ "$retval" -ne '0' ]; then
+                                       RESUME_DEV=`busybox findfs "${REAL_RESUME}" 2>/dev/null`
+                                       retval=$?
+                               fi
+                               
+                               if [ "${retval}" -ne '0' ]; then
+                                       RESUME_DEV=`blkid -t "${REAL_RESUME}" | cut -d ":" -f 1 2>/dev/null`
+                                       retval=$?
+                               fi
+                               
+                               if [ "${retval}" -eq '0' ] && [ -n "${RESUME_DEV}" ]; then
+                                       good_msg "Detected real_resume=${RESUME_DEV}"
+                                       REAL_RESUME="${RESUME_DEV}"
+                               fi
+                               ;;
+               esac
+
                swsusp_resume
 #              suspend_resume
                tuxonice_resume