diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-09-24 20:09:06 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-09-24 20:09:06 +0000 |
commit | 5c0a1269165388945cbd6e36a8392ca6cab78283 (patch) | |
tree | 266e8670b4d06f228204d7a5acbf93819424d1a8 /etc | |
parent | ec2a000e4fff9f4cb62d384ba22a4eb8dd05baee (diff) | |
download | pfsense-5c0a1269165388945cbd6e36a8392ca6cab78283.zip pfsense-5c0a1269165388945cbd6e36a8392ca6cab78283.tar.gz |
* Sync master password correctly
* Do not down carp interfaces on bootup
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 43 | ||||
-rw-r--r-- | etc/inc/pfsense-utils.inc | 1 | ||||
-rwxr-xr-x | etc/rc | 1 |
3 files changed, 23 insertions, 22 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 8e4024b..7b319e9 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -309,28 +309,27 @@ function interfaces_carp_configure() { if (is_array($config['virtualip']['vip'])) { if(is_array($config['installedpackages']['carpsettings']['config'])) { foreach($config['installedpackages']['carpsettings']['config'] as $carp) - if($carp['pfsyncenabled'] != "") { - if($carp['premption'] != "") - mwexec("/sbin/sysctl net.inet.carp.preempt=1"); - if($carp['balancing'] != "") - mwexec("/sbin/sysctl net.inet.arpbalance=1"); - $carp_sync_int = convert_friendly_interface_to_real_interface_name($carp['pfsyncinterface']); - mwexec("/sbin/ifconfig pfsync0 create"); - mwexec("/sbin/ifconfig pfsync0 syncdev " . $carp_sync_int); - mwexec("/sbin/ifconfig pfsync0 syncif " . $carp_sync_int); - mwexec("/sbin/ifconfig {$carp_sync_int} up"); - mwexec("/sbin/ifconfig pfsync0 up"); - if($g['booting']) { - /* install rules to alllow pfsync to sync up during boot - * carp interfaces will remain down until the bootup sequence finishes - */ - exec("echo pass quick proto carp all keep state > /tmp/rules.boot"); - exec("echo pass quick proto pfsync all >> /tmp/rules.boot"); - exec("echo pass out proto { tcp, udp } from any to any port 53 keep state >> /tmp/rules.boot"); - exec("/sbin/pfctl -f /tmp/rules.boot"); + if($carp['pfsyncenabled'] != "") { + if($carp['premption'] != "") + mwexec("/sbin/sysctl net.inet.carp.preempt=1"); + if($carp['balancing'] != "") + mwexec("/sbin/sysctl net.inet.arpbalance=1"); + $carp_sync_int = convert_friendly_interface_to_real_interface_name($carp['pfsyncinterface']); + mwexec("/sbin/ifconfig pfsync0 create"); + mwexec("/sbin/ifconfig pfsync0 syncdev " . $carp_sync_int); + mwexec("/sbin/ifconfig pfsync0 syncif " . $carp_sync_int); + mwexec("/sbin/ifconfig pfsync0 up"); + if($g['booting']) { + /* install rules to alllow pfsync to sync up during boot + * carp interfaces will remain down until the bootup sequence finishes + */ + exec("echo pass quick proto carp all keep state > /tmp/rules.boot"); + exec("echo pass quick proto pfsync all >> /tmp/rules.boot"); + exec("echo pass out proto { tcp, udp } from any to any port 53 keep state >> /tmp/rules.boot"); + exec("/sbin/pfctl -f /tmp/rules.boot"); + } + $pfsync_instances_counter++; } - $pfsync_instances_counter++; - } } $viparr = &$config['virtualip']['vip']; foreach ($viparr as $vip) { @@ -362,7 +361,7 @@ function interfaces_carp_configure() { } /* remove any dangling carp references */ for($x=$carp_instances_counter; $x<$total_carp_interfaces_defined; $x++) { - mwexec("/sbin/ifconfig carp{$x} down"); + //mwexec("/sbin/ifconfig carp{$x} down"); } unmute_kernel_msgs(); if ($g['booting']) { diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 1b00667..e2ce3c7 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1189,6 +1189,7 @@ function reload_interfaces() { function sync_webgui_passwords() { conf_mount_rw(); mwexec("/usr/sbin/pwd_mkdb -d /etc/ /etc/master.passwd"); + mwexec("/usr/sbin/pwd_mkdb /etc/master.passwd"); conf_mount_ro(); } @@ -158,6 +158,7 @@ fi echo -n "Syncing master.passwd... " /usr/sbin/pwd_mkdb -d /etc/ /etc/master.passwd +/usr/sbin/pwd_mkdb /etc/master.passwd echo "done." # Create an initial utmp file |