Commit d4fe7fbc authored by Franco Fichtner's avatar Franco Fichtner

rc: more $verbose conversion

parent 61626494
...@@ -92,8 +92,13 @@ function load_config_from_file($filename) ...@@ -92,8 +92,13 @@ function load_config_from_file($filename)
* RESULT * RESULT
* $config - array containing all configuration variables * $config - array containing all configuration variables
******/ ******/
function parse_config() function parse_config($verbose = false)
{ {
if ($verbose) {
echo 'Loading configuration...';
flush();
}
$cnf = OPNsense\Core\Config::getInstance(); $cnf = OPNsense\Core\Config::getInstance();
// return config data as array, use old "listags" construction to mark certain elements as array (even if they're not recurring) // return config data as array, use old "listags" construction to mark certain elements as array (even if they're not recurring)
...@@ -102,6 +107,10 @@ function parse_config() ...@@ -102,6 +107,10 @@ function parse_config()
/* make alias table (for faster lookups) */ /* make alias table (for faster lookups) */
alias_make_table($config); alias_make_table($config);
if ($verbose) {
echo "done.\n";
}
return $config; return $config;
} }
......
...@@ -1473,6 +1473,22 @@ function system_kernel_configure($verbose = false) ...@@ -1473,6 +1473,22 @@ function system_kernel_configure($verbose = false)
} }
} }
function system_devd_configure($verbose = false)
{
if ($verbose) {
echo 'Starting device manager...';
flush();
}
exec('/sbin/devd');
/* historic sleep */
sleep(1);
if ($verbose) {
echo "done.\n";
}
}
function system_cron_configure($verbose = false) function system_cron_configure($verbose = false)
{ {
global $config; global $config;
...@@ -1610,10 +1626,15 @@ function system_console_types() ...@@ -1610,10 +1626,15 @@ function system_console_types()
); );
} }
function system_login_configure() function system_login_configure($verbose = false)
{ {
global $config; global $config;
if ($verbose) {
echo 'Configuring login behaviour...';
flush();
}
configd_run('template reload OPNsense/Auth'); configd_run('template reload OPNsense/Auth');
$serialspeed = (!empty($config['system']['serialspeed']) && is_numeric($config['system']['serialspeed'])) ? $config['system']['serialspeed'] : '115200'; $serialspeed = (!empty($config['system']['serialspeed']) && is_numeric($config['system']['serialspeed'])) ? $config['system']['serialspeed'] : '115200';
...@@ -1718,6 +1739,11 @@ function system_login_configure() ...@@ -1718,6 +1739,11 @@ function system_login_configure()
} }
fclose($fd); fclose($fd);
if ($verbose) {
echo "done\n";
flush();
}
/* force init(8) to reload /etc/ttys */ /* force init(8) to reload /etc/ttys */
exec('/bin/kill -HUP 1'); exec('/bin/kill -HUP 1');
} }
......
...@@ -56,16 +56,8 @@ echo "."; ...@@ -56,16 +56,8 @@ echo ".";
require_once("rrd.inc"); require_once("rrd.inc");
echo " done.\n"; echo " done.\n";
/* start devd (dhclient now uses it) */ system_devd_configure(true);
echo "Starting device manager (devd)..."; system_login_configure(true);
system_console_mute();
exec('/sbin/devd');
sleep(1);
system_console_unmute();
echo "done.\n";
/* configure login behaviour */
system_login_configure();
$setup_installer = is_install_media(); $setup_installer = is_install_media();
if ($setup_installer) { if ($setup_installer) {
...@@ -88,11 +80,9 @@ if ($setup_installer) { ...@@ -88,11 +80,9 @@ if ($setup_installer) {
OPNsense\Core\Config::getInstance()->forceReload(); OPNsense\Core\Config::getInstance()->forceReload();
} }
echo "Loading configuration...";
global $config; global $config;
$config = parse_config(); $config = parse_config(true);
convert_config(); convert_config();
echo "done.\n";
/* /*
* Determine if we need to throw a interface exception * Determine if we need to throw a interface exception
......
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