diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-05-05 14:43:00 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-05-05 14:43:00 +0200 |
commit | 264a79bad6862c39f90c521f5321be9ba2ea5f24 (patch) | |
tree | 073e189ea81886ab29bf7ee364636ea507f56b68 /dummy/netifd-proto.sh | |
parent | 6c735bda1dbf9a0aaaa6fbae95d3dfe557e97bf8 (diff) |
netifd-proto.sh: implement proto_add_host_dependency()
Diffstat (limited to 'dummy/netifd-proto.sh')
-rwxr-xr-x | dummy/netifd-proto.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/dummy/netifd-proto.sh b/dummy/netifd-proto.sh index 31af697..7426581 100755 --- a/dummy/netifd-proto.sh +++ b/dummy/netifd-proto.sh @@ -164,7 +164,8 @@ _proto_push_array() { _proto_notify() { local interface="$1" - ubus call network.interface."$interface" notify_proto "$(json_dump)" + local options="$2" + ubus $options call network.interface."$interface" notify_proto "$(json_dump)" } proto_send_update() { @@ -249,6 +250,16 @@ proto_set_available() { _proto_notify "$interface" } +proto_add_host_dependency() { + local interface="$1" + local host="$2" + + json_init + json_add_int action 6 + json_add_string host "$host" + _proto_notify "$interface" -S +} + init_proto() { proto="$1"; shift cmd="$1"; shift |