diff options
author | Leos Pol <lpol@redhat.com> | 2016-10-10 14:21:40 +0200 |
---|---|---|
committer | Lukáš Nykrýn <lnykryn@redhat.com> | 2016-10-10 14:32:20 +0200 |
commit | f8476a8f02b4eaff13db1140162dec8a0d7336cd (patch) | |
tree | fbe25b74ce64768b5dfe729f3e85360a2598e47d | |
parent | 28745ca8101b47b8a33213cfc524a4ada742721b (diff) | |
download | initscripts-f8476a8f02b4eaff13db1140162dec8a0d7336cd.tar initscripts-f8476a8f02b4eaff13db1140162dec8a0d7336cd.tar.gz initscripts-f8476a8f02b4eaff13db1140162dec8a0d7336cd.tar.bz2 initscripts-f8476a8f02b4eaff13db1140162dec8a0d7336cd.tar.xz initscripts-f8476a8f02b4eaff13db1140162dec8a0d7336cd.zip |
service: also mangle the name of unit in echo
-rwxr-xr-x | service | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -82,8 +82,8 @@ if [ -f "${SERVICEDIR}/${SERVICE}" ]; 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} elif `echo $ACTION | egrep -qw "start|stop|restart|try-restart|reload|force-reload|status|condrestart"` ; then - echo $"Redirecting to /bin/systemctl ${ACTION} ${OPTIONS} ${SERVICE}.service" >&2 SERVICE_MANGLED=$(/usr/bin/systemd-escape --mangle ${SERVICE}) + echo $"Redirecting to /bin/systemctl ${ACTION} ${OPTIONS} ${SERVICE_MANGLED}" >&2 exec /bin/systemctl ${ACTION} ${OPTIONS} ${SERVICE_MANGLED} else echo $"The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl." >&2 |