summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-11-04 04:52:56 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-11-04 04:52:56 +0000
commitf6189feb576bca8a82964791e8d3dedcf67e669e (patch)
treed0c18035837e0649b96b7fd42304d5e04d13cc86 /etc/inc
parent25530ad85b9ccdd8eb938de1cbf240b5b403a072 (diff)
downloadpfsense-f6189feb576bca8a82964791e8d3dedcf67e669e.zip
pfsense-f6189feb576bca8a82964791e8d3dedcf67e669e.tar.gz
* Do not close early
* Do not exec multiple times
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/interfaces.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index f150498..f89a821 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -385,7 +385,7 @@ function interfaces_carp_configure() {
}
}
$viparr = &$config['virtualip']['vip'];
- $fd = fopen("/tmp/carp.sh");
+ $fd = fopen("/tmp/carp.sh", "w");
foreach ($viparr as $vip) {
if ($vip['mode'] == "carp") {
/*
@@ -406,15 +406,15 @@ function interfaces_carp_configure() {
*/
if($debugging)
echo "Configuring carp{$carp_instances_counter}.\n";
- fwrite($fd, "/sbin/ifconfig carp" . $carp_instances_counter . " " . $vip['subnet'] . "/" . $vip['subnet_bits'] . " broadcast " . $broadcast_address . " vhid " . $vip['vhid'] . "{$carpdev} advskew 200 " . $password);
+ fwrite($fd, "/sbin/ifconfig carp" . $carp_instances_counter . " " . $vip['subnet'] . "/" . $vip['subnet_bits'] . " broadcast " . $broadcast_address . " vhid " . $vip['vhid'] . "{$carpdev} advskew 200 " . $password . "\n");
//mwexec("/sbin/ifconfig carp" . $carp_instances_counter . " " . $vip['subnet'] . "/" . $vip['subnet_bits'] . " broadcast " . $broadcast_address . " vhid " . $vip['vhid'] . "{$carpdev} advskew 200 " . $password);
if($g['booting'])
mwexec("/sbin/ifconfig carp" . $carp_instances_counter . " up");
$carp_instances_counter++;
}
- fclose($fd);
- mwexec("/bin/sh /tmp/carp.sh");
}
+ mwexec("/bin/sh /tmp/carp.sh");
+ fclose($fd);
if ($g['booting']) {
unmute_kernel_msgs();
echo "done.\n";
OpenPOWER on IntegriCloud