From: nbd Date: Sun, 14 Jan 2007 22:29:13 +0000 (+0000) Subject: add checks for {ip,ip6}addr in the network config X-Git-Url: https://git.rohieb.name/openwrt.git/commitdiff_plain/b766f543866d39111ac8e50f2d7972f8f58822c7?hp=cd8d915cb516fac2a2cd17d027ed784d92f9d86d add checks for {ip,ip6}addr in the network config git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6099 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh index f3ead6a79..96890acac 100755 --- a/package/base-files/files/lib/network/config.sh +++ b/package/base-files/files/lib/network/config.sh @@ -117,8 +117,8 @@ setup_interface() { config_get gateway "$config" gateway config_get dns "$config" dns - $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" - $DEBUG ifconfig "$iface" inet6 add "$ip6addr" + [ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" + [ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" inet6 add "$ip6addr" [ -z "$gateway" ] || route add default gw "$gateway" [ -z "$dns" -o -f /tmp/resolv.conf.auto ] || { for ns in $dns; do