From 53537f4d23091457f644ab8b3edf09c2dca4351c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 25 Aug 2015 11:30:00 +0200 Subject: [PATCH] network: also mark interfaces up with their MAC --- 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 18b4100..761b0cd 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 2562af6..d944126 100755 --- a/modules.d/40network/ifup.sh +++ b/modules.d/40network/ifup.sh @@ -400,6 +400,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) ;;