Commit 0df2b39c authored by Franco Fichtner's avatar Franco Fichtner

rc: more $verbose conversion

(cherry picked from commit 052c9599)
parent cf7098d0
...@@ -184,20 +184,19 @@ function interface_netgraph_needed($interface) ...@@ -184,20 +184,19 @@ function interface_netgraph_needed($interface)
return false; return false;
} }
function interfaces_loopback_configure() function interfaces_loopback_configure($verbose = false)
{ {
if (file_exists("/var/run/booting")) { if ($verbose) {
echo gettext("Configuring loopback interface..."); echo 'Configuring loopback interface...';
flush();
} }
legacy_interface_setaddress('lo0', '127.0.0.1'); legacy_interface_setaddress('lo0', '127.0.0.1');
interfaces_bring_up("lo0"); interfaces_bring_up("lo0");
if (file_exists("/var/run/booting")) { if ($verbose) {
echo gettext("done.") . "\n"; echo "done.\n";
} }
return 0;
} }
function interfaces_vlan_configure($realif = '') function interfaces_vlan_configure($realif = '')
......
...@@ -1282,7 +1282,7 @@ EOD; ...@@ -1282,7 +1282,7 @@ EOD;
} }
if (file_exists("/var/run/booting")) { if (file_exists("/var/run/booting")) {
echo "done\n"; echo "done.\n";
} }
return count($filterdns_list); return count($filterdns_list);
......
...@@ -1415,7 +1415,7 @@ function services_dhcrelay_configure($verbose = false) ...@@ -1415,7 +1415,7 @@ function services_dhcrelay_configure($verbose = false)
} }
if ($verbose) { if ($verbose) {
echo "done\n"; echo "done.\n";
} }
} }
...@@ -1529,7 +1529,7 @@ function services_dhcrelay6_configure($verbose = false) ...@@ -1529,7 +1529,7 @@ function services_dhcrelay6_configure($verbose = false)
} }
if ($verbose) { if ($verbose) {
echo "done\n"; echo "done.\n";
} }
} }
......
...@@ -344,10 +344,15 @@ function get_nameservers() ...@@ -344,10 +344,15 @@ function get_nameservers()
return $master_list; return $master_list;
} }
function system_hosts_generate() function system_hosts_generate($verbose = false)
{ {
global $config; global $config;
if ($verbose) {
echo 'Generating /etc/hosts...';
flush();
}
$syscfg = $config['system']; $syscfg = $config['system'];
$hosts = "127.0.0.1\tlocalhost localhost.{$syscfg['domain']}\n"; $hosts = "127.0.0.1\tlocalhost localhost.{$syscfg['domain']}\n";
...@@ -374,6 +379,10 @@ function system_hosts_generate() ...@@ -374,6 +379,10 @@ function system_hosts_generate()
dnsmasq_hosts_generate(); dnsmasq_hosts_generate();
unbound_hosts_generate(); unbound_hosts_generate();
if ($verbose) {
echo "done.\n";
}
} }
function system_hostname_configure($verbose = false) function system_hostname_configure($verbose = false)
...@@ -1764,8 +1773,7 @@ function system_login_configure($verbose = false) ...@@ -1764,8 +1773,7 @@ function system_login_configure($verbose = false)
fclose($fd); fclose($fd);
if ($verbose) { if ($verbose) {
echo "done\n"; echo "done.\n";
flush();
} }
/* force init(8) to reload /etc/ttys */ /* force init(8) to reload /etc/ttys */
......
...@@ -100,14 +100,8 @@ system_sysctl_configure(true); ...@@ -100,14 +100,8 @@ system_sysctl_configure(true);
system_timezone_configure(true); system_timezone_configure(true);
system_firmware_configure(true); system_firmware_configure(true);
system_hostname_configure(true); system_hostname_configure(true);
system_hosts_generate(true);
/* make hosts file */ interfaces_loopback_configure(true);
system_hosts_generate();
/* configure loopback interface */
interfaces_loopback_configure();
/* start syslogd */
system_syslogd_start(true); system_syslogd_start(true);
/* set up interfaces */ /* set up interfaces */
......
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