]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
- support resume from initrd_dir
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 2 Apr 2009 23:36:05 +0000 (23:36 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Thu, 2 Apr 2009 23:36:05 +0000 (23:36 +0000)
svn-id: @10300

mod-suspend.sh

index 8c897ce73c28b8dd981e9c9df9b6f04bdf1758b9..e8ec003fbf391a12dc41b6cf1ce8d2d702fcb734 100644 (file)
@@ -15,14 +15,19 @@ setup_mod_suspend() {
        if is_yes "$USE_SUSPEND" && is_yes "$USE_TUXONICE"; then
                warn "Tuxonice and mainline suspend are exclusive!"
        fi
+
+       resume=$(find_tool $initrd_dir/resume /usr/${_lib}/suspend/resume /usr/sbin/resume)
+
+       if [ -x "$resume" -a -f /etc/suspend.conf ]; then
+               USE_SUSPEND=yes
+       else
+               USE_SUSPEND=no
+       fi
 }
 
 # find modules for for suspend
 # @access      public
 find_modules_suspend() {
-       if [ ! -x /usr/${_lib}/suspend/resume -a ! -x /usr/sbin/resume ]; then
-               die "/usr/${_lib}/suspend/resume is missing!"
-       fi
        resume_dev="$(awk '/^resume device =/ { print $4 } ' /etc/suspend.conf)"
 
        local vgvolumes=$VGVOLUMES
This page took 0.323322 seconds and 4 git commands to generate.