Browse Source

add checks for {ip,ip6}addr in the network config

SVN-Revision: 6099
Felix Fietkau 19 years ago
parent
commit
d18161d2df
1 changed files with 2 additions and 2 deletions
  1. 2 2
      package/base-files/files/lib/network/config.sh

+ 2 - 2
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