]> git.madduck.net Git - code/molly-guard.git/blobdiff - shutdown

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

use settings file
[code/molly-guard.git] / shutdown
index be733b71ac4c0fc771e89642ba82a6b06a7d3605..7a36d9486b8f062b229c5345d57e99699ddeab7e 100755 (executable)
--- a/shutdown
+++ b/shutdown
@@ -90,27 +90,27 @@ do_real_cmd()
 }
 
 if [ $DO_NOTHING -eq 1 ]; then
-  echo "I: demo mode; $ME will not do anything due to --molly-guard-do-nothing."
+  echo "I: demo mode; $ME will not do anything due to --molly-guard-do-nothing." >&2
 fi
 
 # pass through certain commands
 case "$CMD $CMDARGS" in
   (*shutdown\ *-c*)
     # allow canceling shutdowns
-    echo "I: executing $CMD $CMDARGS regardless of check results."
+    echo "I: executing $CMD $CMDARGS regardless of check results." >&2
     do_real_cmd
     ;;
 esac
 
 MOLLYGUARD_CMD=$CMD; export MOLLYGUARD_CMD
 MOLLYGUARD_DO_NOTHING=$DO_NOTHING; export MOLLYGUARD_DO_NOTHING
-MOLLYGUARD_SETTINGS="/etc/default/$ME"; export MOLLYGUARD_SETTINGS
+MOLLYGUARD_SETTINGS="/etc/molly-guard/rc"; export MOLLYGUARD_SETTINGS
 
 for script in $(run-parts --test $SCRIPTSDIR); do
   ret=0
   eval $script $SCRIPTARGS || ret=$?
   if [ $ret -ne 0 ]; then
-    echo "W: aborting $CMD due to ${script##*/} exiting with code $ret."
+    echo "W: aborting $CMD due to ${script##*/} exiting with code $ret." >&2
     exit $ret
   fi
 done