diff options
author | Vinicius Coque <vinicius.coque@bluepex.com> | 2010-12-14 09:56:34 -0200 |
---|---|---|
committer | Vinicius Coque <vinicius.coque@bluepex.com> | 2010-12-14 09:56:34 -0200 |
commit | c92ccac76ff2938c5718440efdd846317f6a2d55 (patch) | |
tree | 1dd190505af25191f0289552a155732d7432da58 /etc/inc/gwlb.inc | |
parent | 386447eaa7cfe727678455955285b1ecd4e6e9f9 (diff) | |
parent | c9b08a50f0ba328ac0569247eb2063d34f7e6279 (diff) | |
download | pfsense-c92ccac76ff2938c5718440efdd846317f6a2d55.zip pfsense-c92ccac76ff2938c5718440efdd846317f6a2d55.tar.gz |
Merge remote branch 'mainline/master' into inc
Conflicts:
etc/inc/auth.inc
etc/inc/config.lib.inc
etc/inc/filter.inc
etc/inc/gwlb.inc
etc/inc/interfaces.inc
etc/inc/pfsense-utils.inc
etc/inc/pkg-utils.inc
etc/inc/shaper.inc
etc/inc/upgrade_config.inc
etc/inc/xmlparse.inc
usr/local/www/fbegin.inc
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r-- | etc/inc/gwlb.inc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 8ff94d9..1dcd6c1 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -41,8 +41,6 @@ function setup_gateways_monitor() { if (!is_array($gateways_arr)) { log_error("No gateways to monitor. Apinger will not be run."); killbypid("{$g['varrun_path']}/apinger.pid"); - // TEMPORARY XXX - exec("/usr/bin/killall -9 apinger"); @unlink("{$g['tmp_path']}/apinger.status"); return; } @@ -215,7 +213,7 @@ EOD; log_error(sprintf(gettext('Removing static route for monitor %1$s and adding a new route through %2$s'), $gateway['monitor']. $gateway['gateway'])); mwexec("/sbin/route delete -host " . escapeshellarg($gateway['monitor']), true); mwexec("/sbin/route add -host " . escapeshellarg($gateway['monitor']) . - " " . escapeshellarg($gateway['gateway'])); + " " . escapeshellarg($gateway['gateway']), true); } $apingerconfig .= $alarmscfg; @@ -225,8 +223,6 @@ EOD; fclose($fd); killbypid("{$g['varrun_path']}/apinger.pid"); - // TEMPORARY XXX - exec("/usr/bin/killall -9 apinger"); if (is_dir("{$g['tmp_path']}")) chmod("{$g['tmp_path']}", 01777); if (!is_dir("{$g['vardb_path']}/rrd")) @@ -236,6 +232,7 @@ EOD; /* start a new apinger process */ @unlink("{$g['tmp_path']}/apinger.status"); + sleep(1); mwexec_bg("/usr/local/sbin/apinger -c {$g['varetc_path']}/apinger.conf"); return 0; @@ -291,13 +288,14 @@ function return_gateways_array($disabled = false) { $gateway['friendlyiface'] = $gateway['interface']; $gateway['interface'] = get_real_interface($gateway['interface']); - /* Some interface like wan might be default but have no info recorded + /* FIXME: Should this be enabled. + * Some interface like wan might be default but have no info recorded * the config. - */ if ($gateway['friendlyiface'] == "wan" && !isset($gateway['defaultgw'])) { if (file_exists("{$g['tmp_path']}/{$gateway['interface']}_defaultgw")) $gateway['defaultgw'] = true; } + */ /* include the gateway index as the attribute */ $gateway['attribute'] = $i; @@ -409,9 +407,11 @@ function return_gateway_groups_array() { $tiers_count = count($tiers); if($tiers_count == 0) { /* Oh dear, we have no members! Engage Plan B */ - $msg = gettext("Gateways status could not be determined, considering all as up/active."); - log_error($msg); - notify_via_growl($msg); + if (!$g['booting']) { + $msg = gettext("Gateways status could not be determined, considering all as up/active."); + log_error($msg); + notify_via_growl($msg); + } $tiers = $backupplan; } /* sort the tiers array by the tier key */ |