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