summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gaffney <agaffney@gentoo.org>2009-07-19 14:47:05 -0500
committerAndrew Gaffney <agaffney@gentoo.org>2009-07-19 14:47:05 -0500
commitf3ae1fe692fed337e1765e2c76ddb12f349817c5 (patch)
tree6b57aae4ce9f87283bbf62e29514eed613c2175d /defaults
parentChange command used to determine real filename for REAL_RESUME for Gentoo bug... (diff)
downloadgenkernel-f3ae1fe692fed337e1765e2c76ddb12f349817c5.tar.gz
genkernel-f3ae1fe692fed337e1765e2c76ddb12f349817c5.tar.bz2
genkernel-f3ae1fe692fed337e1765e2c76ddb12f349817c5.zip
Alternative solution for Gentoo bug #269603
Diffstat (limited to 'defaults')
-rwxr-xr-xdefaults/initrd.scripts12
1 files changed, 11 insertions, 1 deletions
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 66130ae..1f9372e 100755
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -858,7 +858,7 @@ rundebugshell() {
swsusp_resume() {
# determine swap resume partition
- local device=$(ls -lL "${REAL_RESUME}" | sed 's/\ */ /g' | cut -d \ -f 5-6 | sed 's/,\ */:/')
+ local device=$(get_real_filename "${REAL_RESUME}")
[ -f /sys/power/resume ] && echo "${device}" > /sys/power/resume
return 0
}
@@ -987,3 +987,13 @@ setup_unionfs() {
USE_UNIONFS_NORMAL=0
fi
}
+
+get_real_filename() {
+ local file=$1
+
+ if [ -L "${file}" ]; then
+ readlink ${file}
+ elif [ -f "${file}" ]; then
+ echo "${file}"
+ fi
+}