diff options
author | Václav Pavlín <vpavlin@redhat.com> | 2013-08-07 14:54:46 +0200 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2013-08-19 14:11:12 +0200 |
commit | 513ed0501d8665e04fd1950fb6f95f152df9b4e4 (patch) | |
tree | 1a073a1bb666c8eba02a78df0f6d71210d1e04ba /service | |
parent | 4e2971ae366d192a892db979fcac02106b4579ff (diff) | |
download | initscripts-513ed0501d8665e04fd1950fb6f95f152df9b4e4.tar initscripts-513ed0501d8665e04fd1950fb6f95f152df9b4e4.tar.gz initscripts-513ed0501d8665e04fd1950fb6f95f152df9b4e4.tar.bz2 initscripts-513ed0501d8665e04fd1950fb6f95f152df9b4e4.tar.xz initscripts-513ed0501d8665e04fd1950fb6f95f152df9b4e4.zip |
service: filter actions that are not supported by systemctl in service (#947823)
Diffstat (limited to 'service')
-rwxr-xr-x | service | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -74,7 +74,9 @@ 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} -else +elif `echo $ACTION | egrep -q "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 + exit 2 fi |