diff options
-rwxr-xr-x | service | 2 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifdown | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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} diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown index 90b1c834..18cee69d 100755 --- a/sysconfig/network-scripts/ifdown +++ b/sysconfig/network-scripts/ifdown @@ -46,7 +46,7 @@ if [ "$_use_nm" = "true" ]; then DEVICE=$(nmcli -t --fields uuid,device con show --active | awk -F ':' "\$1 == \"$UUID\" { print \$2 }") fi if [ -n "$DEVICE" ] && ! is_nm_device_unmanaged "$DEVICE" ; then - if ! LC_ALL=C nmcli -t -f STATE,DEVICE dev status | egrep -q "^(failed|disconnected|unmanaged|unavailable):$DEVICE$"; then + if ! LC_ALL=C nmcli -t -f STATE,DEVICE dev status | grep -Eq "^(failed|disconnected|unmanaged|unavailable):$DEVICE$"; then nmcli dev disconnect "$DEVICE" exit $? fi |