Blame 0131-network-also-mark-interfaces-up-with-their-MAC.patch

Harald Hoyer bb31e7
From 26fbe97bbe3079d7dc63b19fb3a0728570da7628 Mon Sep 17 00:00:00 2001
Harald Hoyer bb31e7
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer bb31e7
Date: Tue, 25 Aug 2015 11:30:00 +0200
Harald Hoyer bb31e7
Subject: [PATCH] network: also mark interfaces up with their MAC
Harald Hoyer bb31e7
Harald Hoyer bb31e7
(cherry picked from commit 53537f4d23091457f644ab8b3edf09c2dca4351c)
Harald Hoyer bb31e7
---
Harald Hoyer bb31e7
 modules.d/40network/dhclient-script.sh | 7 +++++++
Harald Hoyer bb31e7
 modules.d/40network/ifup.sh            | 4 ++++
Harald Hoyer bb31e7
 2 files changed, 11 insertions(+)
Harald Hoyer bb31e7
Harald Hoyer bb31e7
diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
Harald Hoyer bb31e7
index 4e2090d..f55611d 100755
Harald Hoyer bb31e7
--- a/modules.d/40network/dhclient-script.sh
Harald Hoyer bb31e7
+++ b/modules.d/40network/dhclient-script.sh
Harald Hoyer bb31e7
@@ -139,6 +139,10 @@ case $reason in
Harald Hoyer bb31e7
 
Harald Hoyer bb31e7
         echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh
Harald Hoyer bb31e7
         >/tmp/net.$netif.up
Harald Hoyer bb31e7
+        if [ -e /sys/class/net/${netif}/address ]; then
Harald Hoyer bb31e7
+            > /tmp/net.$(cat /sys/class/net/${netif}/address).up
Harald Hoyer bb31e7
+        fi
Harald Hoyer bb31e7
+
Harald Hoyer bb31e7
         ;;
Harald Hoyer bb31e7
 
Harald Hoyer bb31e7
     RENEW|REBIND)
Harald Hoyer bb31e7
@@ -171,6 +175,9 @@ case $reason in
Harald Hoyer bb31e7
 
Harald Hoyer bb31e7
         echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh
Harald Hoyer bb31e7
         >/tmp/net.$netif.up
Harald Hoyer bb31e7
+        if [ -e /sys/class/net/${netif}/address ]; then
Harald Hoyer bb31e7
+            > /tmp/net.$(cat /sys/class/net/${netif}/address).up
Harald Hoyer bb31e7
+        fi
Harald Hoyer bb31e7
         ;;
Harald Hoyer bb31e7
 
Harald Hoyer bb31e7
     RENEW6|REBIND6)
Harald Hoyer bb31e7
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
Harald Hoyer bb31e7
index 647c856..dd47e4b 100755
Harald Hoyer bb31e7
--- a/modules.d/40network/ifup.sh
Harald Hoyer bb31e7
+++ b/modules.d/40network/ifup.sh
Harald Hoyer bb31e7
@@ -377,6 +377,10 @@ for p in $(getargs ip=); do
Harald Hoyer bb31e7
 
Harald Hoyer bb31e7
     > /tmp/net.${netif}.up
Harald Hoyer bb31e7
 
Harald Hoyer bb31e7
+    if [ -e /sys/class/net/${netif}/address ]; then
Harald Hoyer bb31e7
+        > /tmp/net.$(cat /sys/class/net/${netif}/address).up
Harald Hoyer bb31e7
+    fi
Harald Hoyer bb31e7
+
Harald Hoyer bb31e7
     case $autoconf in
Harald Hoyer bb31e7
         dhcp|on|any|dhcp6)
Harald Hoyer bb31e7
             ;;