diff options
author | Dave Reisner <d@falconindy.com> | 2011-06-18 11:39:59 -0400 |
---|---|---|
committer | Dave Reisner <d@falconindy.com> | 2011-06-18 12:18:04 -0400 |
commit | 4cad51425325abf13b7a8772ff09f852238423c2 (patch) | |
tree | ec8ffc6bf603cbca8b78d144e5ded0c700245cf7 /network | |
parent | 590ee44c1495ea67d057e0d21e4ebc25c0e17782 (diff) |
network: support gateway-less network setup
This also discards the explicit deletion of the route in network_down,
as bringing down the interface will take care of this for us.
Addresses FS#24690
Thanks-to: Matthias Dienstbier <matthias_dienstbier@yahoo.de>
Signed-off-by: Dave Reisner <d@falconindy.com>
Diffstat (limited to 'network')
-rwxr-xr-x | network | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -33,7 +33,7 @@ network_up() { fi done ip addr add $address/$netmask broadcast ${broadcast:-+} dev $interface || return 1 - ip route add default via $gateway || return 1 + [[ $gateway ]] && { ip route add default via $gateway || return 1; } else dhcpcd $DHCPCD_ARGS $interface || return 1 fi @@ -43,7 +43,6 @@ network_down() { if [[ -f /var/run/dhcpcd-$interface.pid ]]; then dhcpcd -k $interface || return 1 else - ip route del default || return 1 ip addr flush dev $interface || return 1 fi |