Skip to contentSkip to conversation

use linkup in dhclient-script.sh

PATCH In review Dave Young 2 participants 2 messages Jan 6, 2013 – Jan 22, 2013 1 message not in the archive

lore
Share & tools
lore

Dave Young

author
#0 lore raw

PATCH 1/1 use linkup in dhclient-script.sh

linkup is a wrapper function for waiting interface ready and up. change to use linkup as what we do in ifup script.

---
 modules.d/40network/dhclient-script.sh |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
modules.d/40network/dhclient-script.sh +2 -4
@@ -25,8 +25,7 @@ setup_interface() {
         if ! ip link set $netif mtu $mtu ; then
             ip link set $netif down
             ip link set $netif mtu $mtu
-            ip link set $netif up
-            wait_for_if_up $netif
+            linkup $netif
         fi
     fi
 
@@ -62,8 +61,7 @@ netif=$interface
 case $reason in
     PREINIT)
         echo "dhcp: PREINIT $netif up"
-        ip link set $netif up
-        wait_for_if_up $netif
+        linkup $netif
         ;;
     BOUND)
         echo "dhcp: BOND setting $netif"

A message that is not in the archive (sent off-list or not yet received): 20130106061754.A96B664097-4/[email protected]

#2 lore raw

Am 06.01.2013 07:17, schrieb Dave Young:

Quoted 22 lines

linkup is a wrapper function for waiting interface ready and up. change to use linkup as what we do in ifup script.

---
 modules.d/40network/dhclient-script.sh |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
modules.d/40network/dhclient-script.sh +1 -2
@@ -25,8 +25,7 @@ setup_interface() {
         if ! ip link set $netif mtu $mtu ; then
             ip link set $netif down
             ip link set $netif mtu $mtu
-            ip link set $netif up
-            wait_for_if_up $netif
+            linkup $netif
         fi
     fi
 

modules.d/40network/dhclient-script.sh netif=$interface · line 67

Quoted 9 lines
modules.d/40network/dhclient-script.sh +1 -2
@@ -62,8 +61,7 @@ netif=$interface
 case $reason in
     PREINIT)
         echo "dhcp: PREINIT $netif up"
-        ip link set $netif up
-        wait_for_if_up $netif
+        linkup $netif
         ;;
     BOUND)
         echo "dhcp: BOND setting $netif"

merged