mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 11:26:13 +00:00
(legacy) zap merge_config_section in pfsense-utils.inc
This commit is contained in:
parent
ec5d6b12c8
commit
97cac62f12
@ -172,27 +172,6 @@ function restore_config_section($section_name, $new_contents)
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* merge_config_section($section_name, new_contents): restore a configuration section,
|
||||
* and write the configuration out
|
||||
* to disk/cf. But preserve the prior
|
||||
* structure if needed
|
||||
*/
|
||||
function merge_config_section($section_name, $new_contents)
|
||||
{
|
||||
global $config;
|
||||
$fname = '/tmp/tmp-' . time();
|
||||
$fout = fopen($fname, "w");
|
||||
fwrite($fout, $new_contents);
|
||||
fclose($fout);
|
||||
$section_xml = parse_xml_config($fname, $section_name);
|
||||
$config[$section_name] = $section_xml;
|
||||
unlink($fname);
|
||||
write_config(sprintf(gettext("Restored %s of config file (maybe from CARP partner)"), $section_name));
|
||||
disable_security_checks();
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* host_firmware_version(): Return the versions used in this install
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user