X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/c58ee1339ba037a6c1b24363a51e6487712d754d..d60212649f655885fbc3733a1c0fcee797a958fc:/target/default/target_skeleton/sbin/ifup diff --git a/target/default/target_skeleton/sbin/ifup b/target/default/target_skeleton/sbin/ifup index 72efa6901..4236de06b 100755 --- a/target/default/target_skeleton/sbin/ifup +++ b/target/default/target_skeleton/sbin/ifup @@ -45,11 +45,12 @@ } done ;; dhcp) + ip=$(nvram get ${type}_ipaddr) pidfile=/tmp/dhcp-${type}.pid if [ -f $pidfile ]; then $DEBUG kill $(cat $pidfile) fi - ${DEBUG:-eval} "udhcpc -i $if -b -p $pidfile &" + ${DEBUG:-eval} "udhcpc -i $if ${ip:+-r $ip} -b -p $pidfile &" ;; pppoe) # handled by /etc/init.d/S50pppoe