diff options
author | smos <seth.mos@dds.nl> | 2012-05-23 09:21:04 +0200 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2012-05-23 09:21:44 +0200 |
commit | 73ce690995bb5969eb2102b82176e38b6522a83e (patch) | |
tree | 4b632c08d0694cd30e7cc2e1d3470e77d47ea350 /usr | |
parent | aec0f2fd54bcd617ad469db67fe34937f339936e (diff) | |
download | pfsense-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-x | usr/local/bin/3gstats.php | 4 |
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); |