summaryrefslogtreecommitdiffstats
path: root/etc/rc.filter_synchronize
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-06-15 15:29:50 -0400
committerjim-p <jimp@pfsense.org>2011-06-15 15:30:35 -0400
commit62905808cbdf86088a637da92f7cb2946e28d527 (patch)
tree8168ccd055db7abe3c1a1c0f7a9e7e92590ab21c /etc/rc.filter_synchronize
parent1540194f7dbd19cbf949bb199dd71432124ce49e (diff)
downloadpfsense-62905808cbdf86088a637da92f7cb2946e28d527.zip
pfsense-62905808cbdf86088a637da92f7cb2946e28d527.tar.gz
Faster/more efficient xmlrpc sync for users/groups. Seems to work fine for me. Coded-By: Ermal
Diffstat (limited to 'etc/rc.filter_synchronize')
-rwxr-xr-xetc/rc.filter_synchronize10
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/rc.filter_synchronize b/etc/rc.filter_synchronize
index 9468110..fe8a30f 100755
--- a/etc/rc.filter_synchronize
+++ b/etc/rc.filter_synchronize
@@ -216,8 +216,12 @@ function carp_sync_xml($url, $username, $password, $sections, $port = 80, $metho
$xml[$section] = backup_vip_config_section();
break;
case 'user':
+ $xml['system'][$section] = $config_copy['system'][$section];
+ $xml['system']['nextuid'] = $config_copy['system']['nextuid'];
+ break;
case 'group':
$xml['system'][$section] = $config_copy['system'][$section];
+ $xml['system']['nextgid'] = $config_copy['system']['nextgid'];
break;
default:
$xml[$section] = $config_copy[$section];
@@ -367,8 +371,8 @@ if (is_array($config['installedpackages']['carpsettings']['config'])) {
$sections[] = 'crl';
}
if ($carp['synchronizeusers'] != "") {
- $mergesections[] = 'user';
- $mergesections[] = 'group';
+ $sections[] = 'user';
+ $sections[] = 'group';
}
if ($carp['synchronizednsforwarder'] != "" and is_array($config['dnsmasq']))
$sections[] = 'dnsmasq';
@@ -391,8 +395,6 @@ if (is_array($config['installedpackages']['carpsettings']['config'])) {
update_filter_reload_status("Signaling CARP reload signal...");
carp_sync_xml($synchronizetoip, $username, $carp['password'], $sections, $port);
- if (is_array($mergesections))
- carp_sync_xml($synchronizetoip, $username, $carp['password'], $mergesections, $port, 'pfsense.restore_config_section');
$cli = new XML_RPC_Client('/xmlrpc.php', $synchronizetoip, $port);
$params = array(
XML_RPC_encode($carp['password'])
OpenPOWER on IntegriCloud