diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-02-18 21:39:21 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-02-18 21:39:21 +0000 |
commit | dab2371ce396b28d6e25cabc6266b3a683575452 (patch) | |
tree | bc6b5fc654bf8b174ddfc5773bc1a564861ef694 /packages | |
parent | fa019059c2eaaf5262d9513dc9d82f978767a87a (diff) | |
download | pfsense-packages-dab2371ce396b28d6e25cabc6266b3a683575452.tar.gz pfsense-packages-dab2371ce396b28d6e25cabc6266b3a683575452.tar.bz2 pfsense-packages-dab2371ce396b28d6e25cabc6266b3a683575452.zip |
If no interface is selected, throw an error to the log files and exit.
Diffstat (limited to 'packages')
-rw-r--r-- | packages/bandwidthd/bandwidthd.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/bandwidthd/bandwidthd.inc b/packages/bandwidthd/bandwidthd.inc index 8e2ee94e..d5a2efd7 100644 --- a/packages/bandwidthd/bandwidthd.inc +++ b/packages/bandwidthd/bandwidthd.inc @@ -71,7 +71,12 @@ function bandwidthd_install_config() { if($skip_intervals) $skip_intervals = "skip_intervals $skip_intervals\n"; - $ifdescrs = array($config['installedpackages']['bandwidthd']['config'][0]['active_interface']); + if($config['installedpackages']['bandwidthd']['config'][0]['active_interface']){ + $ifdescrs = array($config['installedpackages']['bandwidthd']['config'][0]['active_interface']); + } else { + log_error("You should specify a interface for bandwidthd to listen on. exiting."); + exit; + } /* initialize to "" */ $subnets = ""; |