summaryrefslogtreecommitdiff
path: root/modules.d/95resume
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2009-06-18 10:03:51 +0200
committerHarald Hoyer <harald@redhat.com>2009-06-18 10:03:51 +0200
commite2ab42236b875d15d28f1d88f0b09a82536f0823 (patch)
tree0944e81d0a3332ae42170fcdd4048edbc47de8df /modules.d/95resume
parentf0aae472e4cc1257cc086666493f174890b1b510 (diff)
downloaddracut-e2ab42236b875d15d28f1d88f0b09a82536f0823.tar.gz
dracut-e2ab42236b875d15d28f1d88f0b09a82536f0823.tar.bz2
dracut-e2ab42236b875d15d28f1d88f0b09a82536f0823.zip
resume from any suspend partition
If not "noresume" is specified and no explicit "resume=" given, try to resume from any partition with type "suspend"
Diffstat (limited to 'modules.d/95resume')
-rwxr-xr-xmodules.d/95resume/resume-genrules.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules.d/95resume/resume-genrules.sh b/modules.d/95resume/resume-genrules.sh
index 13b91a54..5ff4efe4 100755
--- a/modules.d/95resume/resume-genrules.sh
+++ b/modules.d/95resume/resume-genrules.sh
@@ -5,4 +5,7 @@ if [ -n "$resume" ]; then
printf "SYMLINK==\"%s\", RUN+=\"/bin/sh -c 'echo %%M:%%m > /sys/power/resume'\"\n" \
${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
fi