| 30 | | ip=$(/sbin/ifconfig ppp0 | grep inet | awk '{print $2}'| awk -F : '{print $2}') |
|---|
| 31 | | rx=$(/sbin/ifconfig ppp0 | grep 'RX bytes' | awk -F : '{print $2}' | awk -F' T' '{print $1}') |
|---|
| 32 | | tx=$(/sbin/ifconfig ppp0 | grep 'RX bytes' | awk -F : '{print $3}') |
|---|
| 33 | | resconf=$(cat /etc/dnsmasq.conf 2>/dev/null | grep "^resolv-file=" | cut -d'=' -f 2) |
|---|
| 34 | | resconf="${resconf:-"/etc/resolv.conf"}" |
|---|
| 35 | | dns_servers=$(cat "$resconf" 2>/dev/null | awk 'BEGIN{ dns_count=0 }; /nameserver/ { dns_count++; print "field|@TR<<DNS Server>> " dns_count "|dns_server_" dns_count; print "string|" $2 }') |
|---|
| | 30 | ip=$(/sbin/ifconfig ppp0 | grep inet | awk '{print $2}'| awk -F : '{print $2}') |
|---|
| | 31 | rx=$(/sbin/ifconfig ppp0 | grep 'RX bytes' | awk -F : '{print $2}' | awk -F' T' '{print $1}') |
|---|
| | 32 | tx=$(/sbin/ifconfig ppp0 | grep 'RX bytes' | awk -F : '{print $3}') |
|---|
| | 33 | resconf=$(cat /etc/dnsmasq.conf 2>/dev/null | grep "^resolv-file=" | cut -d'=' -f 2) |
|---|
| | 34 | resconf="${resconf:-"/etc/resolv.conf"}" |
|---|
| | 35 | dns_servers=$(cat "$resconf" 2>/dev/null | awk 'BEGIN{ dns_count=0 }; /nameserver/ { dns_count++; print "field|@TR<<DNS Server>> " dns_count "|dns_server_" dns_count; print "string|" $2 }') |
|---|
| 58 | | case "$(cat /proc/diag/led/3g_blue)" in |
|---|
| 59 | | 1) |
|---|
| 60 | | status="@TR<<Connected>>" |
|---|
| 61 | | action="@TR<<Disconnect>>" |
|---|
| 62 | | if_action="ifdown" |
|---|
| 63 | | hideinfo= |
|---|
| 64 | | ;; |
|---|
| 65 | | 0) |
|---|
| 66 | | status="@TR<<Disconnected>>" |
|---|
| 67 | | action="@TR<<Connect>>" |
|---|
| 68 | | if_action="ifup" |
|---|
| 69 | | ;; |
|---|
| 70 | | esac |
|---|
| | 58 | case "$(cat /proc/diag/led/3g_blue)" in |
|---|
| | 59 | 1) |
|---|
| | 60 | status="@TR<<Connected>>" |
|---|
| | 61 | action="@TR<<Disconnect>>" |
|---|
| | 62 | if_action="ifdown" |
|---|
| | 63 | hideinfo= |
|---|
| | 64 | ;; |
|---|
| | 65 | 0) |
|---|
| | 66 | case "$(cat /proc/diag/led/3g_green)" in |
|---|
| | 67 | 1) |
|---|
| | 68 | status="@TR<<Connect on Demand>>" |
|---|
| | 69 | ;; |
|---|
| | 70 | 0) |
|---|
| | 71 | status="@TR<<Disconnected>>" |
|---|
| | 72 | action="@TR<<Connect>>" |
|---|
| | 73 | if_action="ifup" |
|---|
| | 74 | ;; |
|---|
| | 75 | esac |
|---|
| | 76 | esac |
|---|