summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-06-02 16:10:14 +0200
committersmos <seth.mos@dds.nl>2012-06-02 16:10:14 +0200
commit284101d3b826bf399146fabe7c95eff02b2070f2 (patch)
tree0fb2fae8846cf76192ce71c18050d3335aaebb60 /etc/inc/interfaces.inc
parent75e89498529eca6f306cf7022cc7cc3ab979f25c (diff)
downloadpfsense-284101d3b826bf399146fabe7c95eff02b2070f2.zip
pfsense-284101d3b826bf399146fabe7c95eff02b2070f2.tar.gz
Add support for the ZTE modem stats
Should be generic enough for other modems too.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 147ad1d..b591917 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1736,13 +1736,17 @@ EOD;
/* We can also guess the mondev from the manufacturer */
exec("usbconfig | egrep -ie '(huawei)'", $usbmodemoutput);
mwexec("/bin/ps auxww|grep \"{$interface}\" |grep \"[3]gstats\" | awk '{print $2}' |xargs kill");
- if(stristr("huawei", implode("\n", $ouput))) {
- foreach($ports as $port) {
+ foreach($ports as $port) {
+ if(stristr("huawei", implode("\n", $ouput))) {
$mondev = substr(basename($port), 0, -1);
$devlist = glob("/dev/{$mondev}?");
$mondev = basename(end($devlist));
- log_error("Starting 3gstats.php on device '{$mondev}' for interface '{$interface}'");
- mwexec_bg("/usr/local/bin/3gstats.php {$mondev} {$interface}");
+ }
+ if(stristr("zte", implode("\n", $ouput))) {
+ $mondev = substr(basename($port), 0, -1) . "1";
+ }
+ log_error("Starting 3gstats.php on device '{$mondev}' for interface '{$interface}'");
+ mwexec_bg("/usr/local/bin/3gstats.php {$mondev} {$interface}");
}
}
OpenPOWER on IntegriCloud