diff options
author | Václav Pavlín <vpavlin@redhat.com> | 2013-08-07 14:54:46 +0200 |
---|---|---|
committer | Václav Pavlín <vpavlin@redhat.com> | 2013-08-08 14:42:50 +0200 |
commit | d5257dfdc6cbc37ac473ae9f2ec80a00f5a0c3bc (patch) | |
tree | eafd2e13cf3e05cd662d4d4ed4bb4c05c5ea50a7 | |
parent | 7648a78fc9f973b111776ff8ddb32f5108f6a985 (diff) | |
download | initscripts-d5257dfdc6cbc37ac473ae9f2ec80a00f5a0c3bc.tar initscripts-d5257dfdc6cbc37ac473ae9f2ec80a00f5a0c3bc.tar.gz initscripts-d5257dfdc6cbc37ac473ae9f2ec80a00f5a0c3bc.tar.bz2 initscripts-d5257dfdc6cbc37ac473ae9f2ec80a00f5a0c3bc.tar.xz initscripts-d5257dfdc6cbc37ac473ae9f2ec80a00f5a0c3bc.zip |
service: filter actions that are not supported by systemctl in service (#947823)
-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 |