summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-09-26 19:36:35 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-09-26 19:36:35 +0000
commit04c5bd170108807b560522257e3446d1ab53da53 (patch)
tree845236af2be97e749061c5f52ac1287c588f2de2 /etc
parent92274aed093d7b50b5ee5055bbb94a60835384db (diff)
downloadpfsense-04c5bd170108807b560522257e3446d1ab53da53.zip
pfsense-04c5bd170108807b560522257e3446d1ab53da53.tar.gz
Work around the fact that our traffic shaper configuration takes time to create by leaving the carp interfaces in a down state until the very end of bootup.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc12
-rwxr-xr-xetc/rc.bootup4
2 files changed, 15 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index e00f1b8..e516127 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -351,6 +351,8 @@ function interfaces_carp_configure() {
}
*/
mwexec("/sbin/ifconfig carp" . $carp_instances_counter . " " . $vip['subnet'] . "/" . $vip['subnet_bits'] . " broadcast " . $broadcast_address . " vhid " . $vip['vhid'] . "{$carpdev} advskew " . $vip['advskew'] . $password);
+ if($g['booting'])
+ mwexec("/sbin/ifconfig carp" . $carp_instances_counter . " down");
$carp_instances_counter++;
}
}
@@ -365,6 +367,16 @@ function interfaces_carp_configure() {
}
}
+function interfaces_carp_bring_up_final() {
+ global $config, $g;
+ $carp_instances_counter = 0;
+ $viparr = &$config['virtualip']['vip'];
+ foreach ($viparr as $vip) {
+ mwexec("/sbin/ifconfig carp" . $carp_instances_counter . " up");
+ $carp_instances_counter++;
+ }
+}
+
function interfaces_wireless_configure($if, $wlcfg) {
global $config, $g;
diff --git a/etc/rc.bootup b/etc/rc.bootup
index a5d5f1f..ca7a697 100755
--- a/etc/rc.bootup
+++ b/etc/rc.bootup
@@ -226,6 +226,8 @@
/* start load balancer daemon */
slbd_configure();
+ interfaces_carp_bring_up_final();
+
/* power down hard drive if needed/set */
system_set_harddisk_standby();
@@ -237,4 +239,4 @@
unlink("{$g['varrun_path']}/booting");
$g['booting'] = FALSE;
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud