(legacy) zap merge_config_section in pfsense-utils.inc

This commit is contained in:
Ad Schellevis 2016-02-15 17:54:56 +01:00
parent ec5d6b12c8
commit 97cac62f12

View File

@ -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
*/