summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-05-23 09:21:04 +0200
committersmos <seth.mos@dds.nl>2012-05-23 09:21:44 +0200
commit73ce690995bb5969eb2102b82176e38b6522a83e (patch)
tree4b632c08d0694cd30e7cc2e1d3470e77d47ea350 /usr
parentaec0f2fd54bcd617ad469db67fe34937f339936e (diff)
downloadpfsense-73ce690995bb5969eb2102b82176e38b6522a83e.zip
pfsense-73ce690995bb5969eb2102b82176e38b6522a83e.tar.gz
Make sure to bail the stats script if we can not open the modem device.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/bin/3gstats.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/local/bin/3gstats.php b/usr/local/bin/3gstats.php
index fe7be46..6ea69a2 100755
--- a/usr/local/bin/3gstats.php
+++ b/usr/local/bin/3gstats.php
@@ -15,6 +15,10 @@ $i = 0;
$record = array();
$handle = fopen($device, "r");
+if(! $handle) {
+ echo "Can not open modem stats device\n";
+ exit(1);
+}
while(true) {
$string = "";
$string = fgets($handle, 256);
OpenPOWER on IntegriCloud