mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
move comgt to trunk and add network scripts for umts compatible with the wrt54g3g
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5433 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
35
package/comgt/files/3g.button
Normal file
35
package/comgt/files/3g.button
Normal file
@@ -0,0 +1,35 @@
|
||||
button_action() {(
|
||||
# use led for keeping track of the state
|
||||
case "$(cat /proc/diag/led/3g_green)" in
|
||||
1)
|
||||
ifdown "$1"
|
||||
ifup wan
|
||||
;;
|
||||
0)
|
||||
ifdown wan
|
||||
ifup "$1"
|
||||
;;
|
||||
esac
|
||||
)}
|
||||
|
||||
[ "$ACTION" = "released" -a "$BUTTON" = "3g" ] && {
|
||||
(echo /bin/true > /proc/sys/kernel/hotplug)
|
||||
|
||||
include /lib/network
|
||||
scan_interfaces
|
||||
config_cb() {
|
||||
config_get TYPE "$CONFIG_SECTION" TYPE
|
||||
case "$TYPE" in
|
||||
interface)
|
||||
config_get proto "$CONFIG_SECTION" proto
|
||||
config_get button "$CONFIG_SECTION" button
|
||||
case "$button" in
|
||||
1|on|enabled) [ "$proto" = "3g" ] && button_action "$CONFIG_SECTION";;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
config_load network
|
||||
|
||||
(echo /sbin/hotplug > /proc/sys/kernel/hotplug)
|
||||
} &
|
||||
Reference in New Issue
Block a user