aboutsummaryrefslogtreecommitdiffstats
path: root/packages/bandwidthd
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-02-18 21:39:21 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-02-18 21:39:21 +0000
commitdab2371ce396b28d6e25cabc6266b3a683575452 (patch)
treebc6b5fc654bf8b174ddfc5773bc1a564861ef694 /packages/bandwidthd
parentfa019059c2eaaf5262d9513dc9d82f978767a87a (diff)
downloadpfsense-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/bandwidthd')
-rw-r--r--packages/bandwidthd/bandwidthd.inc7
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 = "";