]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network: also mark interfaces up with their MAC
authorHarald Hoyer <harald@redhat.com>
Tue, 25 Aug 2015 09:30:00 +0000 (11:30 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 11 Nov 2015 15:17:57 +0000 (16:17 +0100)
(cherry picked from commit 53537f4d23091457f644ab8b3edf09c2dca4351c)

modules.d/40network/dhclient-script.sh
modules.d/40network/ifup.sh

index 4e2090dba393091ecbc780477309ccd4c2ecd50f..f55611dc8edc72d39f531cec57d903c3763afe55 100755 (executable)
@@ -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)
index 647c856236027d0fe75df317199380eed2e28fa3..dd47e4bd6fcc02e5b0b30747c25c6f66339fa264 100755 (executable)
@@ -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)
             ;;