3 [ "$DSL_NOTIFICATION_TYPE" = "DSL_INTERFACE_STATUS" ] ||
exit 0
5 .
/usr
/share
/libubox
/jshn.sh
11 interfaces
=$
(ubus list network.interface.\
* | cut
-d"." -f3)
12 for ifc
in $interfaces; do
14 json_load
"$(ifstatus $ifc)"
16 json_get_var proto proto
17 if [ "$proto" != "pppoa" ]; then
22 config_get_bool auto
"$ifc" auto
1
23 if [ "$DSL_INTERFACE_STATUS" = "UP" ]; then
24 if [ "$up" != 1 ] && [ "$auto" = 1 ]; then
25 ( sleep 1; ifup
"$ifc" ) &
28 if [ "$up" = 1 ] && [ "$auto" = 1 ]; then
29 ( sleep 1; ifdown
"$ifc" ) &
31 json_get_var autostart autostart
32 if [ "$up" != 1 ] && [ "$autostart" = 1 ]; then
33 ( sleep 1; ifdown
"$ifc" ) &