ifupdown: support for %retries% (L. Gabriel Somlo <somlo AT cmu.edu>)
authorDenis Vlasenko <vda.linux@googlemail.com>
Tue, 25 Mar 2008 06:10:14 +0000 (06:10 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Tue, 25 Mar 2008 06:10:14 +0000 (06:10 -0000)
networking/ifupdown.c

index 29738c6d0bc20514284ab31bf9407c29fcee5775..20bb709ce49f2c1a150988e7a72b2da0188b144c 100644 (file)
@@ -476,7 +476,7 @@ static const struct dhcp_client_t ext_dhcp_clients[] = {
                "pump -i %iface% -k",
        },
        { "udhcpc",
-               "udhcpc -R -n -p /var/run/udhcpc.%iface%.pid -i %iface%[[ -H %hostname%]][[ -c %clientid%]][[ -s %script%]]",
+               "udhcpc -R -n -p /var/run/udhcpc.%iface%.pid -i %iface%[[ -H %hostname%]][[ -c %clientid%]][[ -s %script%]][[ -t %retries%]]",
                "kill `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null",
        },
 };
@@ -507,7 +507,7 @@ static int dhcp_up(struct interface_defn_t *ifd, execfn *exec)
                return 0;
 #endif
        return execute("udhcpc -R -n -p /var/run/udhcpc.%iface%.pid "
-                       "-i %iface%[[ -H %hostname%]][[ -c %clientid%]][[ -s %script%]]",
+                       "-i %iface%[[ -H %hostname%]][[ -c %clientid%]][[ -s %script%]][[ -t %retries%]]",
                        ifd, exec);
 }
 #else