tags 717109 + patch thanks Bah, forgot to attach the patch. Here we go...
-- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
From bbccf9f4ccfeb69a94eb62d8ddb56af7b146ad52 Mon Sep 17 00:00:00 2001 From: Michael Biebl <[email protected]> Date: Wed, 3 Jul 2013 08:07:20 +0200 Subject: [PATCH] invoke-rc.d: Allow stop and status requests for masked systemd services --- debian/src/sysv-rc/sbin/invoke-rc.d | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/debian/src/sysv-rc/sbin/invoke-rc.d b/debian/src/sysv-rc/sbin/invoke-rc.d index a5e0087..59ee292 100644 --- a/debian/src/sysv-rc/sbin/invoke-rc.d +++ b/debian/src/sysv-rc/sbin/invoke-rc.d @@ -390,12 +390,9 @@ _executable= if [ -n "$is_upstart" ]; then _executable=1 elif [ -n "$is_systemd" ]; then - _state=$(systemctl -p LoadState show "${INITSCRIPTID}.service" 2>/dev/null) - if [ "$_state" != "LoadState=masked" ]; then - _executable=1 - fi + _executable=1 elif testexec "${INITDPREFIX}${INITSCRIPTID}"; then - _executable=1 + _executable=1 fi if [ "$_executable" = "1" ]; then if test x${RC} = x && test x${MODE} = xquery ; then @@ -517,11 +514,17 @@ if test x${FORCE} != x || test ${RC} -eq 104 ; then # pick up any changes. systemctl daemon-reload fi + _state=$(systemctl -p LoadState show "${INITSCRIPTID}.service" 2>/dev/null) case $saction in - start|stop|restart|status) + start|restart) + [ "$_state" != "LoadState=masked" ] || exit 0 + systemctl "${saction}" "${INITSCRIPTID}.service" && exit 0 + ;; + stop|status) systemctl "${saction}" "${INITSCRIPTID}.service" && exit 0 ;; reload) + [ "$_state" != "LoadState=masked" ] || exit 0 _canreload="$(systemctl -p CanReload show ${INITSCRIPTID}.service 2>/dev/null)" if [ "$_canreload" = "CanReload=no" ]; then "${INITDPREFIX}${INITSCRIPTID}" "${saction}" "$@" && exit 0 @@ -533,6 +536,7 @@ if test x${FORCE} != x || test ${RC} -eq 104 ; then systemctl --signal=KILL kill "${INITSCRIPTID}.service" && exit 0 ;; force-reload) + [ "$_state" != "LoadState=masked" ] || exit 0 _canreload="$(systemctl -p CanReload show ${INITSCRIPTID}.service 2>/dev/null)" if [ "$_canreload" = "CanReload=no" ]; then systemctl restart "${INITSCRIPTID}.service" && exit 0 -- 1.8.3.2
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Pkg-sysvinit-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-sysvinit-devel

