From d69414feefd60ad755b2a29b38adfa1232eefe7c Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Thu, 4 Dec 2014 23:19:22 -0600 Subject: [PATCH] Don't try to launch 3gstats unless it's on a valid device. --- etc/inc/interfaces.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index eea4d6b9cc..733ba208d1 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1844,8 +1844,10 @@ EOD; if(preg_match("/zte/i", implode("\n", $usbmodemoutput))) { $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}"); + if($mondev != '') { + log_error("Starting 3gstats.php on device '{$mondev}' for interface '{$interface}'"); + mwexec_bg("/usr/local/bin/3gstats.php {$mondev} {$interface}"); + } } return 1;