X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/c58ee1339ba037a6c1b24363a51e6487712d754d..1d37fc3b1b565a3bda2400f6b1eba04fa7988aa3:/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