mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
* Add merge_installedpackages_section_xmlrpc() call used for merging
specific <installedpackages><AREANAME> sub items without replacing the entire <installedpackages> area with just this item * Adjust TinyDNS sync to use this new method to avoid replacing the entire destination <installedpackages> area which also whipes out all other installd package information.
This commit is contained in:
parent
c2d7f97e9e
commit
82ae5cfc97
@ -105,6 +105,30 @@ function restore_config_section_xmlrpc($raw_params) {
|
||||
return $xmlrpc_g['return']['true'];
|
||||
}
|
||||
|
||||
|
||||
/*****************************/
|
||||
|
||||
|
||||
$merge_config_section_doc = 'XMLRPC wrapper for merging package sections. This method must be called with two parameters: a string containing the local system\'s password and an array to merge into the system\'s config. This function returns true upon completion.';
|
||||
$merge_config_section_sig = array(
|
||||
array(
|
||||
$XML_RPC_Boolean,
|
||||
$XML_RPC_String,
|
||||
$XML_RPC_Struct
|
||||
)
|
||||
);
|
||||
|
||||
function merge_installedpackages_section_xmlrpc($raw_params) {
|
||||
global $config, $xmlrpc_g;
|
||||
$params = xmlrpc_params_to_php($raw_params);
|
||||
if(!xmlrpc_auth($params)) return $xmlrpc_g['return']['authfail'];
|
||||
$config['installedpackages'] = array_merge($config['installedpackages'], $params[0]);
|
||||
$mergedkeys = implode(",", array_keys($params[0]));
|
||||
write_config("Merged in config ({$mergedkeys} sections) from XMLRPC client.");
|
||||
return $xmlrpc_g['return']['true'];
|
||||
}
|
||||
|
||||
|
||||
/*****************************/
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user