X-Git-Url: https://git.madduck.net/code/molly-guard.git/blobdiff_plain/dcbf7f8246ed6cdcd3f84909eef79b78b1dfa6ec..99a389134d3257c43bf258007d5880a4885bdc77:/shutdown diff --git a/shutdown b/shutdown index c9b34f2..8beaa50 100755 --- a/shutdown +++ b/shutdown @@ -15,7 +15,7 @@ CMD="${0##*/}" EXEC="/sbin/$CMD" case "$CMD" in - halt|reboot|shutdown) + halt|reboot|shutdown|poweroff) if [ ! -f $EXEC ]; then echo "E: $ME: not a regular file: $EXEC" >&2 exit 4 @@ -36,9 +36,9 @@ do_real_cmd() { case "$ARGS" in (*--molly-guard-do-nothing*) - ARGS0="${ARGS%% --molly-guard-do-nothing*}" + ARGS0="${ARGS%%--molly-guard-do-nothing*}" ARGS1="${ARGS##*--molly-guard-do-nothing}" - echo "$ME: would run: $EXEC $ARGS0 ${ARGS1# }" + echo "$ME: would run: $EXEC ${ARGS0# } ${ARGS1# }" exit 0;; *) eval exec $EXEC "$ARGS";; esac