From: Andrew Gaffney Date: Sat, 15 Nov 2008 16:04:29 +0000 (-0600) Subject: Applied patch for UUID support for real_resume= from gentoo bug #239687 X-Git-Tag: v3.4.10.902~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a4d6260dd0303492c5884e1128b313f51020b68e;p=genkernel.git Applied patch for UUID support for real_resume= from gentoo bug #239687 --- diff --git a/ChangeLog b/ChangeLog index 7927168..5c93c1c 100644 --- 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 defaults/linuxrc: + Applied patch for UUID support for real_resume= from gentoo bug #239687 + 15 Nov 2008; Andrew Gaffney gen_determineargs.sh: Added modified version of patch from gentoo bug #238707 diff --git a/defaults/linuxrc b/defaults/linuxrc index d5e2870..4dd1b7c 100644 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -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