aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Macku <jamacku@redhat.com>2020-06-16 09:21:48 +0200
committerGitHub <noreply@github.com>2020-06-16 09:21:48 +0200
commitf36c6214a1c0591a1aa7a4f45e3ede305ad0c555 (patch)
treeea527214fec271cc12399626114db7ba31f33f4b
parent31b1b587d5f0bfc16b6953a83c5424ce48d30941 (diff)
downloadinitscripts-f36c6214a1c0591a1aa7a4f45e3ede305ad0c555.tar
initscripts-f36c6214a1c0591a1aa7a4f45e3ede305ad0c555.tar.gz
initscripts-f36c6214a1c0591a1aa7a4f45e3ede305ad0c555.tar.bz2
initscripts-f36c6214a1c0591a1aa7a4f45e3ede305ad0c555.tar.xz
initscripts-f36c6214a1c0591a1aa7a4f45e3ede305ad0c555.zip
Replace grep -EL with subshell since -L changed behaviour
Option -L is not supported in grep 3.2+ Related to #rhbz1824324 ----------- Sugested by @lnykryn Related to issue #300 (cherry picked from commit 04bb81ecfef80477a6bfa5b7598f27f5ad53f86e)
-rwxr-xr-xetc/rc.d/init.d/network4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network
index 45632cc9..9e3cfbff 100755
--- a/etc/rc.d/init.d/network
+++ b/etc/rc.d/init.d/network
@@ -128,7 +128,7 @@ start)
continue
fi
- if LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i > /dev/null ; then
+ if ( . ./ifcfg-"$i" ; is_false "$ONBOOT" ) ; then
# this loads the module, to preserve ordering
is_available $i
continue
@@ -139,7 +139,7 @@ start)
# Bring up xDSL and VPN interfaces
for i in $vlaninterfaces $bridgeinterfaces $xdslinterfaces $vpninterfaces ; do
- if ! LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i >/dev/null 2>&1 ; then
+ if ( . ./ifcfg-"$i" ; ! is_false "$ONBOOT" ) ; then
action $"Bringing up interface $i: " ./ifup $i boot
[ $? -ne 0 ] && rc=1
fi