aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2014-02-13 10:59:45 +0100
committerLukas Nykryn <lnykryn@redhat.com>2014-02-13 14:36:55 +0100
commit8e8c8d062d5dbf29235def1caecf30a26d4859c1 (patch)
tree997eb60eee1458a7fade903153a48245c330e619
parent518bec1d454713b6a16f96784134b98f38aee9c1 (diff)
downloadinitscripts-8e8c8d062d5dbf29235def1caecf30a26d4859c1.tar
initscripts-8e8c8d062d5dbf29235def1caecf30a26d4859c1.tar.gz
initscripts-8e8c8d062d5dbf29235def1caecf30a26d4859c1.tar.bz2
initscripts-8e8c8d062d5dbf29235def1caecf30a26d4859c1.tar.xz
initscripts-8e8c8d062d5dbf29235def1caecf30a26d4859c1.zip
service: fix action matching
-rwxr-xr-xservice2
1 files changed, 1 insertions, 1 deletions
diff --git a/service b/service
index 8ef7f6e5..3c9661b1 100755
--- a/service
+++ b/service
@@ -74,7 +74,7 @@ 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}" -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}
-elif `echo $ACTION | egrep -q "start|stop|restart|try-restart|reload|force-reload|status"` ; then
+elif `echo $ACTION | egrep -qw "start|stop|restart|try-restart|reload|force-reload|status"` ; then
echo $"Redirecting to /bin/systemctl ${ACTION} ${OPTIONS} ${SERVICE}.service" >&2
exec /bin/systemctl ${ACTION} ${OPTIONS} ${SERVICE}.service
else