projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
proto-shell: allow running protocols without proto_task.
[project/netifd.git]
/
scripts
/
netifd-proto.sh
diff --git
a/scripts/netifd-proto.sh
b/scripts/netifd-proto.sh
index
b3d5bb5
..
447f0f6
100644
(file)
--- a/
scripts/netifd-proto.sh
+++ b/
scripts/netifd-proto.sh
@@
-121,8
+121,9
@@
proto_add_ipv4_route() {
local mask="$2"
local gw="$3"
local source="$4"
local mask="$2"
local gw="$3"
local source="$4"
+ local metric="$5"
- append PROTO_ROUTE "$target/$mask/$gw///$source"
+ append PROTO_ROUTE "$target/$mask/$gw/
$metric/
//$source"
}
proto_add_ipv6_route() {
}
proto_add_ipv6_route() {
@@
-134,7
+135,7
@@
proto_add_ipv6_route() {
local source="$6"
local table="$7"
local source="$6"
local table="$7"
- append PROTO_ROUTE6 "$target/$mask/$gw/$metric/$valid/$
source/$tabl
e"
+ append PROTO_ROUTE6 "$target/$mask/$gw/$metric/$valid/$
table/$sourc
e"
}
proto_add_ipv6_prefix() {
}
proto_add_ipv6_prefix() {
@@
-212,9
+213,9
@@
_proto_push_route() {
str="${str#*/}"
local valid="${str%%/*}"
str="${str#*/}"
str="${str#*/}"
local valid="${str%%/*}"
str="${str#*/}"
- local
sourc
e="${str%%/*}"
+ local
tabl
e="${str%%/*}"
str="${str#*/}"
str="${str#*/}"
- local
tabl
e="${str}"
+ local
sourc
e="${str}"
json_add_object ""
json_add_string target "$target"
json_add_object ""
json_add_string target "$target"
@@
-361,6
+362,7
@@
init_proto() {
dump)
add_protocol() {
no_device=0
dump)
add_protocol() {
no_device=0
+ no_proto_task=0
available=0
renew_handler=0
available=0
renew_handler=0
@@
-372,8
+374,10
@@
init_proto() {
eval "proto_$1_init_config"
json_close_array
json_add_boolean no-device "$no_device"
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 available "$available"
json_add_boolean renew-handler "$renew_handler"
+ json_add_boolean lasterror "$lasterror"
json_dump
}
;;
json_dump
}
;;