From 6b524b567d2303838242823545afed98db81548e Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 10 Oct 2005 00:08:04 +0000 Subject: Only convert config on m0n0wall upgrade --- usr/local/www/diag_backup.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'usr') diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php index 62fafee..d4dbca3 100755 --- a/usr/local/www/diag_backup.php +++ b/usr/local/www/diag_backup.php @@ -151,23 +151,22 @@ if ($_POST) { /* this will be picked up by /index.php */ conf_mount_rw(); touch("/needs_package_sync"); - $reloadall = true; $savemsg = "The configuration has been restored. The firewall is now rebooting."; /* remove cache, we will force a config reload */ if(file_exists("/tmp/config.cache")) unlink("/tmp/config.cache"); parse_config(false); - /* force a configuration upgrade */ - convert_config(); if($m0n0wall_upgrade == true) { + /* force a configuration upgrade */ + convert_config(); if($config['system']['gateway'] <> "") { $config['interfaces']['wan']['gateway'] = $config['system']['gateway']; } unset($config['shaper']); + write_config(); + conf_mount_ro(); } - write_config(); - conf_mount_ro(); } else { $input_errors[] = "The configuration could not be restored."; } -- cgit v1.1