aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-01-14 22:29:13 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-01-14 22:29:13 +0000
commita455d0988cc20d251b17036669991e5125bf65da (patch)
tree7e4288c1ad14f297422397648b4bba08d467356a /package
parentedf3bfb0af075d55e64edf9b8a7ecd887d1f1880 (diff)
downloadupstream-a455d0988cc20d251b17036669991e5125bf65da.tar.gz
upstream-a455d0988cc20d251b17036669991e5125bf65da.tar.bz2
upstream-a455d0988cc20d251b17036669991e5125bf65da.zip
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
Diffstat (limited to 'package')
-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