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
29dcbf58
Commit
29dcbf58
authored
Sep 22, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc: more loader.conf changes
parent
52c78955
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
25 deletions
+14
-25
+POST_INSTALL
+POST_INSTALL
+3
-13
+PRE_DEINSTALL
+PRE_DEINSTALL
+0
-8
system.inc
src/etc/inc/system.inc
+5
-2
rc.configure_firmware
src/etc/rc.configure_firmware
+1
-0
00-banner
src/etc/rc.loader.d/00-banner
+5
-0
rc.restart_webgui
src/etc/rc.restart_webgui
+0
-2
No files found.
+POST_INSTALL
View file @
29dcbf58
...
...
@@ -21,19 +21,6 @@ EOF
cat /etc/rc.bak >> /etc/rc
rm -f /etc/rc.bak
echo "Updating /boot/loader.conf"
touch /boot/loader.conf
cp /boot/loader.conf /boot/loader.conf.bak
(grep -v loader_brand /boot/loader.conf.bak; \
echo 'loader_brand="opnsense"') > /boot/loader.conf
cp /boot/loader.conf /boot/loader.conf.bak
(grep -v loader_logo /boot/loader.conf.bak; \
echo 'loader_logo="hourglass"') > /boot/loader.conf
cp /boot/loader.conf /boot/loader.conf.bak
(grep -v loader_menu_title /boot/loader.conf.bak; \
echo 'loader_menu_title=""') > /boot/loader.conf
rm -f /boot/loader.conf.bak
echo "Writing package version"
mkdir -p /usr/local/opnsense/version
if [ -f /usr/local/opnsense/version/opnsense ]; then
...
...
@@ -54,6 +41,9 @@ rm -f /usr/local/opnsense/mvc/app/cache/*.php
echo "Execute model migrations"
/usr/local/opnsense/mvc/script/run_migrations.php
echo "Reloading firmware configuration"
/usr/local/etc/rc.configure_firmware
echo "Reloading GUI configuration"
/usr/local/etc/rc.php_ini_setup
if pgrep -q php-cgi; then
...
...
+PRE_DEINSTALL
View file @
29dcbf58
...
...
@@ -9,14 +9,6 @@ cp /etc/shells /etc/shells.bak
(grep -v /usr/local/etc/rc.installer /etc/shells.bak) > /etc/shells
rm -f /etc/shells.bak
echo "Updating /boot/loader.conf"
touch /boot/loader.conf
cp /boot/loader.conf /boot/loader.conf.bak
(grep -v loader_brand /boot/loader.conf.bak) > /boot/loader.conf
cp /boot/loader.conf /boot/loader.conf.bak
(grep -v loader_logo /boot/loader.conf.bak) > /boot/loader.conf
rm -f /boot/loader.conf.bak
echo "Unhooking from /etc/rc"
cp /etc/rc /etc/rc.bak
tail -n +4 /etc/rc.bak > /etc/rc
...
...
src/etc/inc/system.inc
View file @
29dcbf58
...
...
@@ -1930,9 +1930,7 @@ function system_console_configure()
// ** console settings in /boot/loader.conf
$new_boot_config
=
array
();
$new_boot_config
[
'comconsole_speed'
]
=
null
;
$new_boot_config
[
'autoboot_delay'
]
=
'"3"'
;
$new_boot_config
[
'boot_multicons'
]
=
null
;
$new_boot_config
[
'hw.usb.no_pf'
]
=
'"1"'
;
$new_boot_config
[
'boot_serial'
]
=
null
;
$new_boot_config
[
'console'
]
=
null
;
...
...
@@ -1969,6 +1967,11 @@ function system_console_configure()
$new_loader_conf
.=
$line
.
"
\n
"
;
}
}
/* reload static values from rc.loader.d */
mwexecf
(
'/usr/local/etc/rc.loader'
);
/* inject dynamic values directly into loader.conf */
@
file_put_contents
(
'/boot/loader.conf'
,
$new_loader_conf
);
// ** setup /etc/ttys
...
...
src/etc/rc.configure_firmware
View file @
29dcbf58
...
...
@@ -32,3 +32,4 @@ require_once 'util.inc';
require_once
'system.inc'
;
system_firmware_configure
();
system_console_configure
();
src/etc/rc.loader.d/00-banner
0 → 100644
View file @
29dcbf58
##############################################################
# This file was auto-generated using the rc.loader facility. #
# In order to deploy a custom change to this installation, #
# please use /boot/loader.conf.local as it is not written. #
##############################################################
src/etc/rc.restart_webgui
View file @
29dcbf58
...
...
@@ -12,8 +12,6 @@ if (count($argv) > 1 && is_numeric($argv[1])) {
sleep
(
$argv
[
1
]);
}
system_firmware_configure
();
echo
'Restarting webConfigurator...'
;
system_webgui_configure
();
...
...
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