diff options
author | smos <seth.mos@dds.nl> | 2012-05-23 18:00:51 +0200 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2012-05-23 18:00:51 +0200 |
commit | e313da37e61e031413d9269806cb4eecf6b8da4d (patch) | |
tree | 896283cf6d5d7b14669df72c6e9d4969bc3d8a78 /etc/inc/interfaces.inc | |
parent | d23e157a06374c958a7e782e6dd55cd59ecf5c48 (diff) | |
download | pfsense-e313da37e61e031413d9269806cb4eecf6b8da4d.zip pfsense-e313da37e61e031413d9269806cb4eecf6b8da4d.tar.gz |
Be a bit smarter about the stats interface for the huawei cards. Some of the K series have the stats on 0.2, the E series on 0.3
Some of the older E series only have 0.2 too. The new K3770 I got today is too new.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index e94b7f4..01d29a7 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1729,7 +1729,9 @@ EOD; foreach($ports as $port) { mwexec("/bin/ps auxww|grep \"{$interface}\" |grep \"[3]gstats\" | awk '{print $2}' |xargs kill"); - $mondev = substr(basename($port), 0, -1). "3"; + $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}"); } |