. /etc/networks/$net
-if [ $enable = 'no' ]; then exit 0; fi
-#if [ $enable -eq 0 ]; then exit 0; fi
+if [ "$enable" = 'no' ]; then exit 0; fi
ifdown_pre
IFS=';'
done
-for address in $addr do
- IFS="$saveifs"
- ip addr del $address dev $dev
- IFS=';'
-done
+if [ "$addr" = 'dhcp' ]; then
+ /sbin/dhcpcd -q -k $dev
+else
+ for address in $addr; do
+ IFS="$saveifs"
+ ip addr del $address dev $dev
+ IFS=';'
+ done
+fi
# how do we determine if we should bring the link down?
# there could be other configurations that also set up IP