diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2017-10-23 23:20:31 +0300 |
---|---|---|
committer | Dee'Kej <deekej@linuxmail.org> | 2017-10-30 17:05:05 +0100 |
commit | 9170aa51fd4e8336cc34db3a1aa29989a024b50c (patch) | |
tree | c2aa704e664034cd5f80f3a943c10e64b9386d66 /service | |
parent | 5829c811dd082ac046846bb932d9d14fbc777c17 (diff) | |
download | initscripts-9170aa51fd4e8336cc34db3a1aa29989a024b50c.tar initscripts-9170aa51fd4e8336cc34db3a1aa29989a024b50c.tar.gz initscripts-9170aa51fd4e8336cc34db3a1aa29989a024b50c.tar.bz2 initscripts-9170aa51fd4e8336cc34db3a1aa29989a024b50c.tar.xz initscripts-9170aa51fd4e8336cc34db3a1aa29989a024b50c.zip |
Avoid some unnecessary stat calls
Diffstat (limited to 'service')
-rwxr-xr-x | service | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -79,7 +79,7 @@ if [ -f "${SERVICEDIR}/${SERVICE}" ]; then /bin/systemctl stop ${SERVICE}.service fi 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 +elif [ -n "${ACTION}" ] && [ -x "${ACTIONDIR}/${SERVICE}/${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}) |