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

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