summaryrefslogtreecommitdiff
path: root/modules.d/95resume
diff options
context:
space:
mode:
Diffstat (limited to 'modules.d/95resume')
-rwxr-xr-xmodules.d/95resume/parse-resume.sh2
-rwxr-xr-xmodules.d/95resume/resume-genrules.sh14
2 files changed, 9 insertions, 7 deletions
diff --git a/modules.d/95resume/parse-resume.sh b/modules.d/95resume/parse-resume.sh
index 32680c33..b460a169 100755
--- a/modules.d/95resume/parse-resume.sh
+++ b/modules.d/95resume/parse-resume.sh
@@ -15,6 +15,8 @@ case "$resume" in
resume="/dev/disk/by-label/${resume#LABEL=}" ;;
UUID=*) \
resume="/dev/disk/by-uuid/${resume#UUID=}" ;;
+ PARTUUID=*) \
+ resume="/dev/disk/by-partuuid/${resume#PARTUUID=}" ;;
esac
if splash=$(getarg splash=); then
diff --git a/modules.d/95resume/resume-genrules.sh b/modules.d/95resume/resume-genrules.sh
index ee4eacbe..34511d79 100755
--- a/modules.d/95resume/resume-genrules.sh
+++ b/modules.d/95resume/resume-genrules.sh
@@ -21,18 +21,18 @@ if [ -n "$resume" ]; then
{
if [ -x /usr/sbin/resume ]; then
- printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/usr/sbin/resume %s '%s'\"\n" \
+ printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue /usr/sbin/resume %s '%s'\"\n" \
${resume#/dev/} "$a_splash" "$resume";
- printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/usr/sbin/resume %s '%s'\"\n" \
+ printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue /usr/sbin/resume %s '%s'\"\n" \
${resume#/dev/} "$a_splash" "$resume";
fi
- printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/bin/sh -c 'echo %%M:%%m > /sys/power/resume'\"\n" \
+ printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue /bin/sh -c 'echo %%M:%%m > /sys/power/resume'\"\n" \
${resume#/dev/};
- printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/bin/sh -c 'echo %%M:%%m > /sys/power/resume'\"\n" \
+ printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue /bin/sh -c 'echo %%M:%%m > /sys/power/resume'\"\n" \
${resume#/dev/};
} >> /etc/udev/rules.d/99-resume.rules
- printf '[ -e "%s" ] && { ln -s "%s" /dev/resume; rm "$job"; }\n' \
+ printf '[ -e "%s" ] && { ln -s "%s" /dev/resume; rm "$job"; udevadm settle; }\n' \
"$resume" "$resume" >> $hookdir/initqueue/settled/resume.sh
printf 'warn "Cancelling resume operation. Device not found."; cancel_wait_for_dev /dev/resume; rm "$job" "%s/initqueue/settled/resume.sh";' \
@@ -43,9 +43,9 @@ if [ -n "$resume" ]; then
elif ! getarg noresume; then
{
if [ -x /usr/sbin/resume ]; then
- printf "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/usr/sbin/resume %s '\$tempnode'\"\n" "$a_splash"
+ printf "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue /usr/sbin/resume %s '\$tempnode'\"\n" "$a_splash"
fi
echo "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\"," \
- " RUN+=\"/bin/sh -c 'echo %M:%m > /sys/power/resume'\"";
+ " RUN+=\"/sbin/initqueue /bin/sh -c 'echo %M:%m > /sys/power/resume'\"";
} >> /etc/udev/rules.d/99-resume.rules
fi