summaryrefslogtreecommitdiffhomepage
path: root/dummy/netifd-proto.sh
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-14 00:01:42 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-10-14 00:01:42 +0200
commitcb0aeee156725940b4123bd828a831e96cae012f (patch)
treeadd1b8f1a038a8c6b2f1f904b0950f3589d4608b /dummy/netifd-proto.sh
parent547d96cd6d1bdf3624711b08491ca7fce6b4b0a3 (diff)
add support for killing running proto-shell tasks with an arbitrary signal and waiting for their completion
Diffstat (limited to 'dummy/netifd-proto.sh')
-rwxr-xr-xdummy/netifd-proto.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/dummy/netifd-proto.sh b/dummy/netifd-proto.sh
index 9fc9cab..6182ce1 100755
--- a/dummy/netifd-proto.sh
+++ b/dummy/netifd-proto.sh
@@ -149,6 +149,15 @@ proto_run_command() {
_proto_notify "$interface"
}
+proto_kill_command() {
+ local interface="$1"; shift
+
+ json_init
+ json_add_int action 2
+ [ -n "$1" ] && json_add_int signal "$1"
+ _proto_notify "$interface"
+}
+
init_proto() {
proto="$1"; shift
cmd="$1"; shift