summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2015-05-19 20:38:32 +0800
committerFelix Fietkau <nbd@openwrt.org>2015-05-23 16:44:46 +0200
commita7e508b71c1cf3ee9d401510d298195067fba8e5 (patch)
treecb21a1d67fb7567d6dbd74db5a311e6abe7c4167 /scripts
parenta85176bb5153b2834f7723bce1ab2a608dc834ea (diff)
downloadnetifd-a7e508b71c1cf3ee9d401510d298195067fba8e5.tar.gz
proto-shell: allow running protocols without proto_task.
Adds a new config parameter "no-proto-task" for noting that no proto_task will be running for this protocol type. This is required since then change in commit "d0dcf74 proto-shell: retry setup if the proto handler script quits without changing the state or starting a process". The change is mainly for protocols like xl2tpd in which control commands are sent to another daemon xl2tpd to start L2TP negotiation and pppd process who is not under netifd's control as proto_task as is the case in other ppp related protocols like pppoe, pptp, etc. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/netifd-proto.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/netifd-proto.sh b/scripts/netifd-proto.sh
index 95c1bb3..447f0f6 100644
--- a/scripts/netifd-proto.sh
+++ b/scripts/netifd-proto.sh
@@ -362,6 +362,7 @@ init_proto() {
dump)
add_protocol() {
no_device=0
+ no_proto_task=0
available=0
renew_handler=0
@@ -373,6 +374,7 @@ init_proto() {
eval "proto_$1_init_config"
json_close_array
json_add_boolean no-device "$no_device"
+ json_add_boolean no-proto-task "$no_proto_task"
json_add_boolean available "$available"
json_add_boolean renew-handler "$renew_handler"
json_add_boolean lasterror "$lasterror"