summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc19
-rw-r--r--etc/version_base2
2 files changed, 13 insertions, 8 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;
diff --git a/etc/version_base b/etc/version_base
index b8eb026..cf02201 100644
--- a/etc/version_base
+++ b/etc/version_base
@@ -1 +1 @@
-8.1
+8.3
OpenPOWER on IntegriCloud