File 0558-40network-remove-brctl-dependency.patch of Package dracut.10467

From dbf455d3cca765be7453104b6c187ad979ac1e03 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Fri, 16 Feb 2018 15:32:04 +0100
Subject: [PATCH 2/2] 40network: remove brctl dependency

brctl is no longer default in SLE15, and its use has been obsoleted
by iputils2.

References: bsc#1078245
---
 modules.d/40network/ifup.sh         | 6 +++---
 modules.d/40network/module-setup.sh | 1 -
 modules.d/40network/parse-bridge.sh | 5 -----
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 11377e6b..9775084e 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -440,8 +440,8 @@ if [ -e /tmp/bridge.info ]; then
     . /tmp/bridge.info
 # start bridge if necessary
     if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.up ]; then
-        brctl addbr $bridgename
-        brctl setfd $bridgename 0
+        ip link add name $bridgename type bridge forward_delay 0
+        ip link set dev $bridgename up
         for ethname in $bridgeslaves ; do
             if [ "$ethname" = "$bondname" ] ; then
                 DO_BOND_SETUP=yes ifup $bondname -m
@@ -452,7 +452,7 @@ if [ -e /tmp/bridge.info ]; then
             else
                 linkup $ethname
             fi
-            brctl addif $bridgename $ethname
+            ip link set dev $ethname master $bridgename
         done
     fi
 fi
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
index 18cebc91..f99ca44c 100755
--- a/modules.d/40network/module-setup.sh
+++ b/modules.d/40network/module-setup.sh
@@ -35,7 +35,6 @@ install() {
     local _arch _i _dir
     inst_multiple ip hostname sed
     inst_multiple -o arping ping ping6
-    inst_multiple -o brctl
     inst_multiple -o teamd teamdctl teamnl
     inst_simple /etc/libnl/classid
     inst_simple "$WICKEDD_DHCP_PATH/wickedd-dhcp4" "/usr/sbin/wickedd-dhcp4"
diff --git a/modules.d/40network/parse-bridge.sh b/modules.d/40network/parse-bridge.sh
index 212f2595..a15b64e3 100755
--- a/modules.d/40network/parse-bridge.sh
+++ b/modules.d/40network/parse-bridge.sh
@@ -10,11 +10,6 @@
 # return if bridge already parsed
 [ -n "$bridgename" ] && return
 
-# Check if bridge parameter is valid
-if getarg bridge= >/dev/null ; then
-    command -v brctl >/dev/null 2>&1 || die "No 'brctl' installed" 
-fi
-
 parsebridge() {
     local v=${1}:
     set --
-- 
2.13.6

openSUSE Build Service is sponsored by