Commit 29dcbf58 authored by Franco Fichtner's avatar Franco Fichtner

rc: more loader.conf changes

parent 52c78955
...@@ -21,19 +21,6 @@ EOF ...@@ -21,19 +21,6 @@ EOF
cat /etc/rc.bak >> /etc/rc cat /etc/rc.bak >> /etc/rc
rm -f /etc/rc.bak 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" echo "Writing package version"
mkdir -p /usr/local/opnsense/version mkdir -p /usr/local/opnsense/version
if [ -f /usr/local/opnsense/version/opnsense ]; then if [ -f /usr/local/opnsense/version/opnsense ]; then
...@@ -54,6 +41,9 @@ rm -f /usr/local/opnsense/mvc/app/cache/*.php ...@@ -54,6 +41,9 @@ rm -f /usr/local/opnsense/mvc/app/cache/*.php
echo "Execute model migrations" echo "Execute model migrations"
/usr/local/opnsense/mvc/script/run_migrations.php /usr/local/opnsense/mvc/script/run_migrations.php
echo "Reloading firmware configuration"
/usr/local/etc/rc.configure_firmware
echo "Reloading GUI configuration" echo "Reloading GUI configuration"
/usr/local/etc/rc.php_ini_setup /usr/local/etc/rc.php_ini_setup
if pgrep -q php-cgi; then if pgrep -q php-cgi; then
......
...@@ -9,14 +9,6 @@ cp /etc/shells /etc/shells.bak ...@@ -9,14 +9,6 @@ cp /etc/shells /etc/shells.bak
(grep -v /usr/local/etc/rc.installer /etc/shells.bak) > /etc/shells (grep -v /usr/local/etc/rc.installer /etc/shells.bak) > /etc/shells
rm -f /etc/shells.bak 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" echo "Unhooking from /etc/rc"
cp /etc/rc /etc/rc.bak cp /etc/rc /etc/rc.bak
tail -n +4 /etc/rc.bak > /etc/rc tail -n +4 /etc/rc.bak > /etc/rc
......
...@@ -1930,9 +1930,7 @@ function system_console_configure() ...@@ -1930,9 +1930,7 @@ function system_console_configure()
// ** console settings in /boot/loader.conf // ** console settings in /boot/loader.conf
$new_boot_config = array(); $new_boot_config = array();
$new_boot_config['comconsole_speed'] = null; $new_boot_config['comconsole_speed'] = null;
$new_boot_config['autoboot_delay'] = '"3"';
$new_boot_config['boot_multicons'] = null; $new_boot_config['boot_multicons'] = null;
$new_boot_config['hw.usb.no_pf'] = '"1"';
$new_boot_config['boot_serial'] = null; $new_boot_config['boot_serial'] = null;
$new_boot_config['console'] = null; $new_boot_config['console'] = null;
...@@ -1969,6 +1967,11 @@ function system_console_configure() ...@@ -1969,6 +1967,11 @@ function system_console_configure()
$new_loader_conf .= $line . "\n"; $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); @file_put_contents('/boot/loader.conf', $new_loader_conf);
// ** setup /etc/ttys // ** setup /etc/ttys
......
...@@ -32,3 +32,4 @@ require_once 'util.inc'; ...@@ -32,3 +32,4 @@ require_once 'util.inc';
require_once 'system.inc'; require_once 'system.inc';
system_firmware_configure(); system_firmware_configure();
system_console_configure();
##############################################################
# 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. #
##############################################################
...@@ -12,8 +12,6 @@ if (count($argv) > 1 && is_numeric($argv[1])) { ...@@ -12,8 +12,6 @@ if (count($argv) > 1 && is_numeric($argv[1])) {
sleep($argv[1]); sleep($argv[1]);
} }
system_firmware_configure();
echo 'Restarting webConfigurator...'; echo 'Restarting webConfigurator...';
system_webgui_configure(); system_webgui_configure();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment