summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/config.lib.inc
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-12-21 10:09:18 -0200
committerRenato Botelho <renato@netgate.com>2015-12-21 10:09:18 -0200
commit9ba461861d854fc221a2faf5cf8204c31ff30ca7 (patch)
tree7905eb258599c2e8cfb70151a3e4dd09d3d2e43c /src/etc/inc/config.lib.inc
parent7949c054fbcb165fba27b11b06031e2430d2bed7 (diff)
parent7d7da5e5c7aedb11060f0f0906ed0fa8c9a890f8 (diff)
downloadpfsense-9ba461861d854fc221a2faf5cf8204c31ff30ca7.zip
pfsense-9ba461861d854fc221a2faf5cf8204c31ff30ca7.tar.gz
Merge pull request #2309 from phil-davis/tiw
Diffstat (limited to 'src/etc/inc/config.lib.inc')
-rw-r--r--src/etc/inc/config.lib.inc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc
index e5b50ed..0d66706 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
OpenPOWER on IntegriCloud