summaryrefslogtreecommitdiffhomepage
path: root/dummy/netifd-proto.sh
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-14 00:09:16 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-10-14 00:10:49 +0200
commitb021a49efe0641f7c5ca763bc43e5ba73b7a1b5f (patch)
tree17170da43493b3e47b559180611bf69e1d0f5825 /dummy/netifd-proto.sh
parentcb0aeee156725940b4123bd828a831e96cae012f (diff)
proto-shell: allow proto setups without ifname (if interface main dev is present)
Diffstat (limited to 'dummy/netifd-proto.sh')
-rwxr-xr-xdummy/netifd-proto.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/dummy/netifd-proto.sh b/dummy/netifd-proto.sh
index 6182ce1..0af99b2 100755
--- a/dummy/netifd-proto.sh
+++ b/dummy/netifd-proto.sh
@@ -48,7 +48,7 @@ proto_init_update() {
PROTO_ROUTE6=
json_init
json_add_int action 0
- json_add_string "ifname" "$ifname"
+ [ -n "$ifname" -a "*" != "$ifname" ] && json_add_string "ifname" "$ifname"
json_add_boolean "link-up" "$up"
[ -n "$3" ] && json_add_boolean "address-external" "$external"
}