Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
a35f277d
Commit
a35f277d
authored
Apr 03, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wizard: do not write a file to trigger initial wizard
parent
7f42a180
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
40 deletions
+27
-40
viconfig
src/bin/viconfig
+0
-2
config.xml
src/etc/config.xml
+1
-0
config.lib.inc
src/etc/inc/config.lib.inc
+1
-16
index.php
src/www/index.php
+1
-1
setup_wizard.xml
src/www/wizards/setup_wizard.xml
+24
-21
No files found.
src/bin/viconfig
deleted
100755 → 0
View file @
7f42a180
#!/bin/sh
vi /conf/config.xml
src/etc/config.xml
View file @
a35f277d
<?xml version="1.0"?>
<opnsense>
<trigger_initial_wizard/>
<version>
9.9
</version>
<lastchange></lastchange>
<theme>
opnsense
</theme>
...
...
src/etc/inc/config.lib.inc
View file @
a35f277d
...
...
@@ -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 */
...
...
src/www/index.php
View file @
a35f277d
...
...
@@ -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>
...
...
src/www/wizards/setup_wizard.xml
View file @
a35f277d
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment