aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
index f3ead6a791..96890acacd 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