Blame SOURCES/0325-network-also-mark-interfaces-up-with-their-MAC.patch

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