--- modules.d/95resume/resume-genrules.sh | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules.d/95resume/resume-genrules.sh b/modules.d/95resume/resume-genrules.sh index 5ff4efe..002a304 100755 --- a/modules.d/95resume/resume-genrules.sh +++ b/modules.d/95resume/resume-genrules.sh @@ -1,11 +1,15 @@ if [ -n "$resume" ]; then - ( + { printf "KERNEL==\"%s\", RUN+=\"/bin/sh -c 'echo %%M:%%m > /sys/power/resume'\"\n" \ - ${resume#/dev/} + ${resume#/dev/}; printf "SYMLINK==\"%s\", RUN+=\"/bin/sh -c 'echo %%M:%%m > /sys/power/resume'\"\n" \ - ${resume#/dev/} - ) >> /etc/udev/rules.d/99-resume.rules + ${resume#/dev/}; + } >> /etc/udev/rules.d/99-resume.rules elif ! getarg noresume; then - echo "SUBSYSTEM==\"block\", ACTION==\"add\", ENV{ID_FS_TYPE}==\"suspend\", RUN+=\"/bin/sh -c 'echo %M:%m > /sys/power/resume'\"" \ - >> /etc/udev/rules.d/99-resume.rules + { + echo "SUBSYSTEM==\"block\", ACTION==\"add\", ENV{ID_FS_TYPE}==\"suspend\"," \ + " RUN+=\"/bin/sh -c 'echo %M:%m > /sys/power/resume'\""; + echo "SUBSYSTEM==\"block\", ACTION==\"add\", ENV{ID_FS_TYPE}==\"swsuspend\"," \ + " RUN+=\"/bin/sh -c 'echo %M:%m > /sys/power/resume'\""; + } >> /etc/udev/rules.d/99-resume.rules fi -- 1.6.2.2 -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html