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
edefc951
Commit
edefc951
authored
May 22, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc: softcode console restore option on -devel for now
parent
fb489a33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
rc.initial
src/etc/rc.initial
+10
-3
No files found.
src/etc/rc.initial
View file @
edefc951
#!/bin/sh
# Copyright (c) 2014-201
6
Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2014-201
7
Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2004-2011 Scott Ullrich <sullrich@gmail.com>
# Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
# All rights reserved.
...
...
@@ -15,6 +15,11 @@ if [ -n "${*}" ]; then
exit
${
?
}
fi
OPT_RESTORE
=
"13) Restore configuration"
if
[
!
-f
/usr/local/etc/rc.initial.restore
]
;
then
OPT_RESTORE
=
fi
# endless loop
while
:
;
do
...
...
@@ -32,7 +37,7 @@ echo " 2) Set interface IP address 9) pfTop"
echo
" 3) Reset the root password 10) Firewall log"
echo
" 4) Reset to factory defaults 11) Reload all services"
echo
" 5) Power off system 12) Upgrade from console"
echo
" 6) Reboot system
13) Restore a configuration
"
echo
" 6) Reboot system
${
OPT_RESTORE
}
"
echo
read
-p
"Enter an option: "
OPCODE
echo
...
...
@@ -82,7 +87,9 @@ case ${OPCODE} in
/usr/local/etc/rc.initial.firmware
;;
13
)
/usr/local/etc/rc.initial.restore
if
[
-n
"{OPT_RESTORE}"
]
;
then
/usr/local/etc/rc.initial.restore
fi
;;
*
)
;;
...
...
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