source: tags/8.09.2/package/comgt/files/3g.iface

Last change on this file was 6501, checked in by pavlov, 9 years ago

same propset here as changeset:6500

  • Property svn:eol-style set to native
File size: 561 bytes
Line 
1include /lib/network
2config_load network
3scan_interfaces
4config_get proto "$INTERFACE" proto
5[ "$proto" = "3g" ] && {
6        config_get iface "$INTERFACE" ifname
7        case "$ACTION" in
8                ifup)
9                        iptables -I LAN_ACCEPT 1 -i "$iface" -j RETURN
10                        iptables -A FORWARD -o "$iface" -j ACCEPT
11                        iptables -t nat -A POSTROUTING -o "$iface" -j MASQUERADE
12                        set_3g_led 1 1 0
13                ;;
14                ifdown)
15                        iptables -D LAN_ACCEPT -i "$iface" -j RETURN
16                        iptables -D FORWARD -o "$iface" -j ACCEPT
17                        iptables -t nat -D POSTROUTING -o "$iface" -j MASQUERADE
18                        set_3g_led 0 0 0
19                ;;
20        esac
21}
Note: See TracBrowser for help on using the repository browser.