]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
resume from any suspend partition
authorHarald Hoyer <harald@redhat.com>
Thu, 18 Jun 2009 08:03:51 +0000 (10:03 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 18 Jun 2009 08:03:51 +0000 (10:03 +0200)
If not "noresume" is specified and no explicit "resume=" given, try to resume
from any partition with type "suspend"

modules.d/95resume/resume-genrules.sh

index 13b91a541530d1b83454dfc063d36c3c9c91be06..5ff4efe4a085344226684480e732145d18f77aba 100755 (executable)
@@ -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