Commit 2c03711a authored by Ad Schellevis's avatar Ad Schellevis

fix config restore / remove package code from backup/restore

parent 308122b3
#!/bin/sh
vi /conf/config.xml
rm /tmp/config.cache
......@@ -34,7 +34,7 @@ require_once("script/load_phalcon.php");
/****f* config/parse_config
* NAME
* parse_config - Read in config.cache or config.xml if needed and return $config array
* parse_config - Read in config.xml if needed and return $config array
* RESULT
* $config - array containing all configuration variables
******/
......@@ -272,7 +272,6 @@ function reset_factory_defaults($lock = false)
}
}
closedir($dh);
unlink_if_exists('/tmp/config.cache');
/* copy default configuration */
copy('/usr/local/etc/config.xml', '/conf/config.xml');
......
......@@ -44,7 +44,6 @@ $g = array(
"vardb_path" => "/var/db",
"varlog_path" => "/var/log",
"tmp_path" => "/tmp",
"xml_rootobj" => "pfsense",
"admin_group" => "admins",
"product_name" => "OPNsense",
"product_copyright" => "Deciso B.V.",
......
......@@ -495,7 +495,6 @@ function restore_config_section($section_name, $new_contents)
}
$config[$section_name] = &$section_xml;
@unlink('/tmp/config.cache');
write_config(sprintf(gettext("Restored %s of config file (maybe from CARP partner)"), $section_name));
disable_security_checks();
......
......@@ -372,9 +372,6 @@ fi
/usr/local/bin/beep.sh start 2>&1 >/dev/null
# Reset the cache. read-only requires this.
/bin/rm -f /tmp/config.cache
/usr/local/etc/rc.initial.banner
exit 0
This diff is collapsed.
......@@ -55,7 +55,6 @@ if ($_POST) {
$retval = 0;
unlink_if_exists("/tmp/config.cache");
$retval |= filter_configure();
$savemsg = get_std_save_message($retval);
......
......@@ -399,7 +399,6 @@ if ($_POST['apply']) {
if (!is_subsystem_dirty('interfaces'))
$intput_errors[] = gettext("You have already applied your settings!");
else {
unlink_if_exists("{$g['tmp_path']}/config.cache");
clear_subsystem_dirty('interfaces');
if (file_exists("{$g['tmp_path']}/.interfaces.apply")) {
......
......@@ -212,9 +212,6 @@ if (isset($_POST['add_x']) && isset($_POST['if_add'])) {
uksort($config['interfaces'], "compare_interface_friendly_names");
/* XXX: Do not remove this. */
unlink_if_exists("{$g['tmp_path']}/config.cache");
write_config();
$savemsg = gettext("Interface has been added.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment