X-Git-Url: https://git.madduck.net/code/molly-guard.git/blobdiff_plain/842c0f9058ada9b8d7ccca624333803d1404bb22..9f14fa052e94d7b340522ddcdd3d0cfaf744aa21:/shutdown.in?ds=inline diff --git a/shutdown.in b/shutdown.in index 32ba58d..73d2c15 100755 --- a/shutdown.in +++ b/shutdown.in @@ -10,7 +10,7 @@ set -eu ME=molly-guard VERSION=0.4 -SCRIPTSDIR="@ETC_PREFIX@/etc/$ME/run.d" +SCRIPTSDIR="@ETCDIR@/run.d" CMD="${0##*/}" EXEC="/sbin/$CMD" @@ -71,9 +71,9 @@ for arg in "$@"; do --) END_OF_ARGS=1;; *) if [ $END_OF_ARGS -eq 0 ]; then - CMDARGS="${args:+$args }$arg" + CMDARGS="${CMDARGS:+$CMDARGS }$arg" else - SCRIPTARGS="${args:+$args }--arg $arg" + SCRIPTARGS="${SCRIPTARGS:+$SCRIPTARGS }--arg $arg" fi ;; esac @@ -104,7 +104,7 @@ esac MOLLYGUARD_CMD=$CMD; export MOLLYGUARD_CMD MOLLYGUARD_DO_NOTHING=$DO_NOTHING; export MOLLYGUARD_DO_NOTHING -MOLLYGUARD_SETTINGS="@ETC_PREFIX@/etc/$ME/rc"; export MOLLYGUARD_SETTINGS +MOLLYGUARD_SETTINGS="@ETCDIR@/rc"; export MOLLYGUARD_SETTINGS for script in $(run-parts --test $SCRIPTSDIR); do ret=0