diff options
author | Julien Pivotto <roidelapluie@inuits.eu> | 2016-10-20 10:02:30 +0200 |
---|---|---|
committer | Lukáš Nykrýn <lnykryn@redhat.com> | 2016-10-20 10:25:51 +0200 |
commit | c3ff1b4c4d9837514cde7cb2cbd3b15ac4070f73 (patch) | |
tree | b85cc252b6be9a7aa1c086d9aac892941cbb1bcb /service | |
parent | 14cf7c177935c04bf785677a2946ea0a0c0df491 (diff) | |
download | initscripts-c3ff1b4c4d9837514cde7cb2cbd3b15ac4070f73.tar initscripts-c3ff1b4c4d9837514cde7cb2cbd3b15ac4070f73.tar.gz initscripts-c3ff1b4c4d9837514cde7cb2cbd3b15ac4070f73.tar.bz2 initscripts-c3ff1b4c4d9837514cde7cb2cbd3b15ac4070f73.tar.xz initscripts-c3ff1b4c4d9837514cde7cb2cbd3b15ac4070f73.zip |
service: avoid double spaces in systemctl commands
When running:
```
service x restart
```
You get:
```
Redirecting to /bin/systemctl restart x.service
```
With 2 spaces after restart.
This commits fixes that behaviour.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
Diffstat (limited to 'service')
-rwxr-xr-x | service | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -83,7 +83,7 @@ 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 SERVICE_MANGLED=$(/usr/bin/systemd-escape --mangle ${SERVICE}) - echo $"Redirecting to /bin/systemctl ${ACTION} ${OPTIONS} ${SERVICE_MANGLED}" >&2 + echo $"Redirecting to /bin/systemctl ${ACTION}${OPTIONS:+ }${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 |