summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-06-02 11:49:13 +0200
committersmos <seth.mos@dds.nl>2012-06-02 11:49:13 +0200
commit117f8e6f0cf342d62188d192fe0c48d7ae172855 (patch)
tree54e58e21a583ce05b8941d7e32968b347fe06a98 /etc/inc/interfaces.inc
parent488595df35a0e245790e7cf559938c57ffc2d4a4 (diff)
downloadpfsense-117f8e6f0cf342d62188d192fe0c48d7ae172855.zip
pfsense-117f8e6f0cf342d62188d192fe0c48d7ae172855.tar.gz
We are on FreeBSD 8.3 now
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc19
1 files changed, 12 insertions, 7 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 19c5037..23bc4f1 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1731,13 +1731,18 @@ EOD;
$i++;
}
- foreach($ports as $port) {
- mwexec("/bin/ps auxww|grep \"{$interface}\" |grep \"[3]gstats\" | awk '{print $2}' |xargs kill");
- $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}");
+ /* we only support the 3gstats.php for huawei modems for now. Will add more later. */
+ /* We should be able to launch the right version for each modem */
+ /* 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) {
+ $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}");
}
return 1;
OpenPOWER on IntegriCloud