SVN: geninitrd/trunk/mod-suspend.sh

arekm arekm at pld-linux.org
Thu Mar 28 13:34:13 CET 2013


Author: arekm
Date: Thu Mar 28 13:34:13 2013
New Revision: 12642

Modified:
   geninitrd/trunk/mod-suspend.sh
Log:
Warn if 'resume device' option doesn't exist in /etc/suspend.conf.

Modified: geninitrd/trunk/mod-suspend.sh
==============================================================================
--- geninitrd/trunk/mod-suspend.sh	(original)
+++ geninitrd/trunk/mod-suspend.sh	Thu Mar 28 13:34:13 2013
@@ -19,6 +19,12 @@
 
 	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
 }
 


More information about the pld-cvs-commit mailing list