use linkup in dhclient-script.sh
authorDave Young <dave@redhat.com>
Sun, 6 Jan 2013 06:17:54 +0000 (14:17 +0800)
committerHarald Hoyer <harald@redhat.com>
Wed, 23 Jan 2013 14:24:27 +0000 (15:24 +0100)
linkup is a wrapper function for waiting interface ready and up.
change to use linkup as what we do in ifup script.

Signed-off-by: Dave Young <dyoung@redhat.com>
modules.d/40network/dhclient-script.sh

index 12a67e8..a619c04 100755 (executable)
@@ -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"