]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
Warn if 'resume device' option doesn't exist in /etc/suspend.conf.
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 28 Mar 2013 12:34:13 +0000 (12:34 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 28 Mar 2013 12:34:13 +0000 (12:34 +0000)
svn-id: @12642

mod-suspend.sh

index e416de07296866a97e06f1f61c6b814fee6c3bd7..58ca3906f2cc64aa8fdc03e95306313d62285fea 100644 (file)
@@ -19,6 +19,12 @@ setup_mod_suspend() {
 
        if [ ! -x "$resume" ] || [ ! -f /etc/suspend.conf ]; then
                USE_SUSPEND=no
+       else
+               resume_dev="$(awk '/^resume device =/ { print $4 } ' /etc/suspend.conf)"
+               if [ -z "$resume_dev" ]; then
+                       warn "Option 'resume device' not found in /etc/suspend.conf. Disabling suspend support."
+                       USE_SUSPEND=no
+               fi
        fi
 }
 
This page took 0.355733 seconds and 4 git commands to generate.