diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-01-14 22:29:13 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-01-14 22:29:13 +0000 |
commit | d18161d2dfe15efebe2a25a06895bdc1eb04bf71 (patch) | |
tree | ea24e35828441a85cafc9b41c5847a4b1e497112 /package/base-files/files | |
parent | 28b503b47f0d1ed4fe462de15e768465e70e989d (diff) | |
download | mtk-20170518-d18161d2dfe15efebe2a25a06895bdc1eb04bf71.zip mtk-20170518-d18161d2dfe15efebe2a25a06895bdc1eb04bf71.tar.gz mtk-20170518-d18161d2dfe15efebe2a25a06895bdc1eb04bf71.tar.bz2 |
add checks for {ip,ip6}addr in the network config
SVN-Revision: 6099
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-x | package/base-files/files/lib/network/config.sh | 4 |
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 f3ead6a..96890ac 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 |