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