Commit dac39c53 authored by Franco Fichtner's avatar Franco Fichtner

rc: bring back the early installer as optional importer

This sort of reverts commit 5f319ade.
parent 974ff942
......@@ -65,6 +65,26 @@ echo "done.\n";
*/
system_console_mute();
/* loopback device is required early for syslog and the installer */
interfaces_loopback_configure(true);
$setup_installer = is_install_media();
if ($setup_installer) {
echo 'Press any key to start the configuration importer: ';
$key = timeout();
if ($key != "\n") {
echo "\n";
}
if (isset($key)) {
passthru('/usr/local/etc/rc.importer');
}
/* config may have changed via installer import */
OPNsense\Core\Config::getInstance()->forceReload();
}
global $config;
$config = parse_config(true);
convert_config();
......@@ -138,7 +158,7 @@ if ($ipsec_dynamic_hosts) {
// generate configuration data for all installed templates
configd_run('template reload *');
if (is_install_media()) {
if ($setup_installer) {
/*
* Installer mode requires setting up an extra user and
* we will protect it with root's password. We can only
......
......@@ -79,4 +79,4 @@ for n in 5 4 3 2 1; do
done
echo
/usr/local/etc/rc.reboot
reboot
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