Revision 343bb325
Added by Scott Ullrich over 15 years ago
usr/local/www/diag_backup.php | ||
---|---|---|
300 | 300 |
/* this will be picked up by /index.php */ |
301 | 301 |
conf_mount_rw(); |
302 | 302 |
mark_subsystem_dirty("restore"); |
303 |
$savemsg = "The configuration has been restored. You need to reboot your firewall."; |
|
304 | 303 |
touch("/conf/needs_package_sync"); |
305 | 304 |
/* remove cache, we will force a config reboot */ |
306 | 305 |
if(file_exists("{$g['tmp_path']}/config.cache")) |
... | ... | |
415 | 414 |
add_base_packages_menu_items(); |
416 | 415 |
convert_config(); |
417 | 416 |
conf_mount_ro(); |
418 |
$savemsg = "The m0n0wall configuration has been restored and upgraded to pfSense. You need to reboot your firewall.";
|
|
417 |
$savemsg = "The m0n0wall configuration has been restored and upgraded to pfSense."; |
|
419 | 418 |
mark_subsystem_dirty("restore"); |
420 | 419 |
} |
421 | 420 |
if(isset($config['captiveportal']['enable'])) { |
422 | 421 |
/* for some reason ipfw doesn't init correctly except on bootup sequence */ |
423 |
$savemsg = "The configuration has been restored. You need to reboot your firewall."; |
|
424 | 422 |
mark_subsystem_dirty("restore"); |
425 | 423 |
} |
426 | 424 |
setup_serial_port(); |
... | ... | |
450 | 448 |
$input_errors[] = "XXX - this feature may hose your config (do NOT backrev configs!) - billm"; |
451 | 449 |
if ($ver2restore <> "") { |
452 | 450 |
$conf_file = "{$g['cf_conf_path']}/bak/config-" . strtotime($ver2restore) . ".xml"; |
453 |
if (config_install($conf_file) == 0) { |
|
454 |
mark_subsystem_dirty("restore"); |
|
455 |
$savemsg = "The configuration has been restored. You need to reboot your firewall."; |
|
456 |
} else { |
|
457 |
$input_errors[] = "The configuration could not be restored."; |
|
458 |
} |
|
451 |
if (config_install($conf_file) == 0) { |
|
452 |
mark_subsystem_dirty("restore"); |
|
459 | 453 |
} else { |
460 |
$input_errors[] = "No version selected.";
|
|
454 |
$input_errors[] = "The configuration could not be restored.";
|
|
461 | 455 |
} |
456 |
} else { |
|
457 |
$input_errors[] = "No version selected."; |
|
458 |
} |
|
462 | 459 |
} |
463 | 460 |
} |
464 | 461 |
} |
Also available in: Unified diff
Do not show reboot notices twice. Resolves #191