And lets only do critical shutdown when a script is specified, shall we :)
authorskeezix <skeezix@flotsam-vm.(none)>
Thu, 18 Feb 2010 03:28:16 +0000 (22:28 -0500)
committerskeezix <skeezix@flotsam-vm.(none)>
Thu, 18 Feb 2010 03:28:16 +0000 (22:28 -0500)
apps/pndevmapperd.c

index 713b819..c31cade 100644 (file)
@@ -753,7 +753,7 @@ void sigalrm_handler ( int n ) {
   }
 
   // first -- are we critical yet? if so, shut down!
-  if ( batlevel <= b_shutdown ) {
+  if ( batlevel <= b_shutdown && b_shutdown_script ) {
     int x;
 
     pnd_log ( pndn_error, "CRITICAL BATTERY LEVEL -- shutdown the system down! Invoke: %s\n", b_shutdown_script );