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