diff options
Diffstat (limited to 'src/etc/inc/config.lib.inc')
-rw-r--r-- | src/etc/inc/config.lib.inc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index 62763b0..c7e6385 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -246,7 +246,7 @@ function parse_config_bootup() { if (strstr($g['platform'], "cdrom")) { /* try copying the default config. to the floppy */ echo gettext("Resetting factory defaults...") . "\n"; - reset_factory_defaults(true); + reset_factory_defaults(true, false); if (!file_exists("{$g['conf_path']}/config.xml")) { echo gettext("No XML configuration file found - using factory defaults.\n" . "Make sure that the configuration floppy disk with the conf/config.xml\n" . @@ -604,7 +604,7 @@ function write_config($desc="Unknown", $backup = true, $write_config_only = fals * RESULT * integer - indicates completion ******/ -function reset_factory_defaults($lock = false) { +function reset_factory_defaults($lock = false, $reboot_required = true) { global $g; conf_mount_rw(); @@ -631,7 +631,12 @@ function reset_factory_defaults($lock = false) { disable_security_checks(); /* call the wizard */ - touch("/conf/trigger_initial_wizard"); + if ($reboot_required) { + // If we need a reboot first then touch a different trigger file. + touch("/conf/trigger_initial_wizard_after_reboot"); + } else { + touch("/conf/trigger_initial_wizard"); + } if (!$lock) { unlock($lockkey); } @@ -1019,4 +1024,4 @@ function pfSense_clear_globals() { register_shutdown_function('pfSense_clear_globals'); -?> +?>
\ No newline at end of file |