]> 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>
Tue, 25 Aug 2015 09:30:00 +0000 (11:30 +0200)
modules.d/40network/dhclient-script.sh
modules.d/40network/ifup.sh

index 18b41000f59f77d32c03bd904f47596c31e85407..761b0cd2810e93b43b34433cfb9f84fd7233ce76 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 2562af610b849013d9504c769235d66d8e3ab679..d944126c101967d52f89306096f4666599b9fa31 100755 (executable)
@@ -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)
             ;;