aboutsummaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2017-10-23 23:11:41 +0300
committerDee'Kej <deekej@linuxmail.org>2017-10-30 17:05:44 +0100
commit969d3e5b1e905e1d0f989fe51ea64873c17355d7 (patch)
tree12ac0ddf6e12dbba028f8744c15d53d5c7f20dec /service
parent9170aa51fd4e8336cc34db3a1aa29989a024b50c (diff)
downloadinitscripts-969d3e5b1e905e1d0f989fe51ea64873c17355d7.tar
initscripts-969d3e5b1e905e1d0f989fe51ea64873c17355d7.tar.gz
initscripts-969d3e5b1e905e1d0f989fe51ea64873c17355d7.tar.bz2
initscripts-969d3e5b1e905e1d0f989fe51ea64873c17355d7.tar.xz
initscripts-969d3e5b1e905e1d0f989fe51ea64873c17355d7.zip
Use grep -E instead of deprecated egrep
Diffstat (limited to 'service')
-rwxr-xr-xservice2
1 files changed, 1 insertions, 1 deletions
diff --git a/service b/service
index f3c524ae..357c2a69 100755
--- a/service
+++ b/service
@@ -81,7 +81,7 @@ 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 [ -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
+elif `echo $ACTION | grep -Eqw "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:+ }${OPTIONS} ${SERVICE_MANGLED}" >&2
exec /bin/systemctl ${ACTION} ${OPTIONS} ${SERVICE_MANGLED}