From 8e8c8d062d5dbf29235def1caecf30a26d4859c1 Mon Sep 17 00:00:00 2001 From: Lukas Nykryn Date: Thu, 13 Feb 2014 10:59:45 +0100 Subject: service: fix action matching --- service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1