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 protocol handlers to add interface error messages and block interf...
[project/netifd.git]
/
dummy
/
proto
/
ppp.sh
diff --git
a/dummy/proto/ppp.sh
b/dummy/proto/ppp.sh
index
adce2ca
..
6f5dfcc
100755
(executable)
--- a/
dummy/proto/ppp.sh
+++ b/
dummy/proto/ppp.sh
@@
-33,15
+33,25
@@
pppoe_init() {
}
pppoe_setup() {
}
pppoe_setup() {
+ local interface="$1"
+ local device="$2"
+
json_get_var username username
json_get_var password password
json_get_var username username
json_get_var password password
- echo "pppoe_setup($
1, $2
), username=$username, password=$password"
+ echo "pppoe_setup($
interface, $device
), username=$username, password=$password"
proto_init_update ppp0 1
proto_add_ipv4_address "192.168.2.1" 32
proto_init_update ppp0 1
proto_add_ipv4_address "192.168.2.1" 32
- proto_send_update "$1"
+ proto_add_dns_server "192.168.2.2"
+ proto_send_update "$interface"
+ proto_run_command "$interface" sleep 30
}
pppoe_teardown() {
}
pppoe_teardown() {
+ [ "$ERROR" = 9 ] && {
+ proto_notify_error "$interface" PROCESS_KILLED
+ proto_block_restart "$interface"
+ }
+ proto_kill_command "$interface"
return
}
return
}