mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
wizard: do not write a file to trigger initial wizard
This commit is contained in:
parent
7f42a18081
commit
a35f277d56
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
vi /conf/config.xml
|
||||
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<opnsense>
|
||||
<trigger_initial_wizard/>
|
||||
<version>9.9</version>
|
||||
<lastchange></lastchange>
|
||||
<theme>opnsense</theme>
|
||||
|
||||
@ -200,23 +200,8 @@ function write_config($desc = 'Unknown', $backup = true)
|
||||
******/
|
||||
function reset_factory_defaults($sync = true)
|
||||
{
|
||||
/* create conf directory, if necessary */
|
||||
@mkdir('/conf');
|
||||
|
||||
/* clear out /conf */
|
||||
$dh = opendir('/conf');
|
||||
while ($filename = readdir($dh)) {
|
||||
if (($filename != '.') && ($filename != '..')) {
|
||||
unlink_if_exists('/conf/' . $filename);
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
|
||||
unlink_if_exists('/conf/*' . $filename);
|
||||
disable_security_checks();
|
||||
|
||||
/* call the wizard */
|
||||
touch('/conf/trigger_initial_wizard');
|
||||
|
||||
setup_serial_port();
|
||||
|
||||
/* as we go through a special case directly reboot */
|
||||
|
||||
@ -402,7 +402,7 @@ echo $jscriptstr;
|
||||
<?php
|
||||
## If it is the first time webConfigurator has been
|
||||
## accessed since initial install show this stuff.
|
||||
if(file_exists('/conf/trigger_initial_wizard')) : ?>
|
||||
if (isset($config['trigger_initial_wizard'])) : ?>
|
||||
<header class="page-content-head">
|
||||
<div class="container-fluid">
|
||||
<h1><?=gettext("Starting initial configuration"); ?>!</h1>
|
||||
|
||||
@ -2,30 +2,30 @@
|
||||
<pfsensewizard>
|
||||
<copyright>
|
||||
/*
|
||||
Copyright (C) 2014 Deciso B.V.
|
||||
Copyright (C) 2004, 2005 Scott Ullrich
|
||||
All rights reserved.
|
||||
Copyright (C) 2014 Deciso B.V.
|
||||
Copyright (C) 2004, 2005 Scott Ullrich
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
</copyright>
|
||||
<totalsteps>9</totalsteps>
|
||||
@ -41,7 +41,10 @@
|
||||
</field>
|
||||
</fields>
|
||||
<stepbeforeformdisplay>
|
||||
unlink_if_exists('/conf/trigger_initial_wizard');
|
||||
if (isset($config['trigger_initial_wizard'])) {
|
||||
unset($config['trigger_initial_wizard']);
|
||||
write_config(gettext("Triggered initial wizard"));
|
||||
}
|
||||
</stepbeforeformdisplay>
|
||||
</step>
|
||||
<step>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user