aboutsummaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2013-04-03 15:54:21 +0200
committerLukas Nykryn <lnykryn@redhat.com>2013-04-03 15:56:05 +0200
commit148b75753d124d5d02e37549df66536e0cb4e05c (patch)
treebf759cd26d7c553627a3ba41b7e3f48a275f2ef9 /service
parenta89df09d512e5331ad16f4f5c1bdc01acdaca4c4 (diff)
downloadinitscripts-148b75753d124d5d02e37549df66536e0cb4e05c.tar
initscripts-148b75753d124d5d02e37549df66536e0cb4e05c.tar.gz
initscripts-148b75753d124d5d02e37549df66536e0cb4e05c.tar.bz2
initscripts-148b75753d124d5d02e37549df66536e0cb4e05c.tar.xz
initscripts-148b75753d124d5d02e37549df66536e0cb4e05c.zip
service: action should not be empty when calling legacy-actions (#947817)
Diffstat (limited to 'service')
-rwxr-xr-xservice2
1 files changed, 1 insertions, 1 deletions
diff --git a/service b/service
index 5d1209c2..9c2fd4af 100755
--- a/service
+++ b/service
@@ -72,7 +72,7 @@ done
if [ -f "${SERVICEDIR}/${SERVICE}" ]; then
env -i PATH="$PATH" TERM="$TERM" SYSTEMCTL_IGNORE_DEPENDENCIES=${SYSTEMCTL_IGNORE_DEPENDENCIES} SYSTEMCTL_SKIP_REDIRECT=${SYSTEMCTL_SKIP_REDIRECT} "${SERVICEDIR}/${SERVICE}" ${ACTION} ${OPTIONS}
-elif [ -x "${ACTIONDIR}/${SERVICE}/${ACTION}" ]; then
+elif [ -x "${ACTIONDIR}/${SERVICE}/${ACTION}" -a -n "${ACTION}" ]; then
env -i PATH="$PATH" TERM="$TERM" SYSTEMCTL_IGNORE_DEPENDENCIES=${SYSTEMCTL_IGNORE_DEPENDENCIES} SYSTEMCTL_SKIP_REDIRECT=${SYSTEMCTL_SKIP_REDIRECT} "${ACTIONDIR}/${SERVICE}/${ACTION}" ${OPTIONS}
else
echo $"Redirecting to /bin/systemctl ${ACTION} ${OPTIONS} ${SERVICE}.service" >&2