upgrade the ixp4xx ethernet driver to v0.3.1, split the Gateway 7001 support to two...
[openwrt.git] / package / comgt / files / 3g.button
1 button_action() {(
2 # use led for keeping track of the state
3 case "$(cat /proc/diag/led/3g_green)" in
4 1)
5 ifdown "$1"
6 ifup wan
7 ;;
8 0)
9 ifdown wan
10 ifup "$1"
11 ;;
12 esac
13 )}
14
15 [ "$ACTION" = "released" -a "$BUTTON" = "3g" ] && {
16 (echo /bin/true > /proc/sys/kernel/hotplug)
17
18 include /lib/network
19 scan_interfaces
20 config_cb() {
21 config_get TYPE "$CONFIG_SECTION" TYPE
22 case "$TYPE" in
23 interface)
24 config_get proto "$CONFIG_SECTION" proto
25 config_get button "$CONFIG_SECTION" button
26 case "$button" in
27 1|on|enabled) [ "$proto" = "3g" ] && button_action "$CONFIG_SECTION";;
28 esac
29 ;;
30 esac
31 }
32 config_load network
33
34 (echo /sbin/hotplug > /proc/sys/kernel/hotplug)
35 } &
This page took 0.043862 seconds and 5 git commands to generate.