diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-27 10:39:13 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-27 10:39:13 +0200 |
commit | 4ff6bcbee05983037f6a629b114beace5d98bdbe (patch) | |
tree | 05a59174b352d319534c9e86b07cc9605c49f017 /dummy | |
parent | 10741b4974b85c825036eb0717ddc7112f96f5fb (diff) |
proto-shell: add a notify command for setting interface availability
Diffstat (limited to 'dummy')
-rwxr-xr-x | dummy/netifd-proto.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dummy/netifd-proto.sh b/dummy/netifd-proto.sh index e61de46..11337c2 100755 --- a/dummy/netifd-proto.sh +++ b/dummy/netifd-proto.sh @@ -206,6 +206,15 @@ proto_block_restart() { _proto_notify "$interface" } +proto_set_available() { + local interface="$1" + local state="$2" + json_init + json_add_int action 5 + json_add_boolean available "$state" + _proto_notify "$interface" +} + init_proto() { proto="$1"; shift cmd="$1"; shift |