dcavalca / rpms / initscripts

Forked from rpms/initscripts 4 years ago
Clone

Blame SOURCES/55ee446c0715b013e6d54860ae65e55baf544dc3.patch

dd24be
From 55ee446c0715b013e6d54860ae65e55baf544dc3 Mon Sep 17 00:00:00 2001
dd24be
From: Jan Macku <jamacku@redhat.com>
dd24be
Date: Tue, 8 Jan 2019 17:23:13 +0100
dd24be
Subject: [PATCH] Replace grep -EL with subshell since -L changed behaviour
dd24be
dd24be
Sugested by @lnykryn
dd24be
Related to issue #300
dd24be
---
dd24be
 etc/rc.d/init.d/network | 4 ++--
dd24be
 1 file changed, 2 insertions(+), 2 deletions(-)
dd24be
dd24be
diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network
dd24be
index 414bee06..bc5c1502 100755
dd24be
--- a/etc/rc.d/init.d/network
dd24be
+++ b/etc/rc.d/init.d/network
dd24be
@@ -124,7 +124,7 @@ start)
dd24be
             continue
dd24be
         fi
dd24be
 
dd24be
-        if LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i > /dev/null ; then
dd24be
+        if ( . ./ifcfg-"$i" ; is_false "$ONBOOT" ) ; then
dd24be
             # this loads the module, to preserve ordering
dd24be
             is_available $i
dd24be
             continue
dd24be
@@ -135,7 +135,7 @@ start)
dd24be
 
dd24be
     # Bring up xDSL and VPN interfaces
dd24be
     for i in $vlaninterfaces $bridgeinterfaces $xdslinterfaces $vpninterfaces ; do
dd24be
-        if ! LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i >/dev/null 2>&1 ; then
dd24be
+        if ( . ./ifcfg-"$i" ; ! is_false "$ONBOOT" ) ; then
dd24be
             action $"Bringing up interface $i: " ./ifup $i boot
dd24be
             [ $? -ne 0 ] && rc=1
dd24be
         fi