Set hostname early, so boostrap processes, e.g., syslog can use it.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2015-02-26 16:47:55 +01:00
parent fc9758da8e
commit 71ac8bb802
2 changed files with 3 additions and 5 deletions
-2
View File
@@ -33,8 +33,6 @@ General
for really low-end systems w/o `/etc/fstab`.
* Fix `restart_any_lost_procs()`, currently it restarts task/run when
called -- must check `SVC_CMD_SERVICE`, like `svc_monitor()` does.
* Use `/etc/hostname` with fallback to `hostname` from `/etc/finit.conf`
* Set hostname early, so boostrap processes, e.g., syslog can use it.
Init
+3 -3
View File
@@ -195,6 +195,9 @@ int main(int argc, char* argv[])
*/
parse_finit_conf(FINIT_CONF);
/* Set hostname as soon as possible, for syslog et al. */
set_hostname(&hostname);
/*
* Mount filesystems
*/
@@ -234,9 +237,6 @@ int main(int argc, char* argv[])
/* Setup kernel specific settings, e.g. allow broadcast ping, etc. */
run("/sbin/sysctl -e -p /etc/sysctl.conf >/dev/null");
/* Set initial hostname. */
set_hostname(&hostname);
ifconfig("lo", "127.0.0.1", "255.0.0.0", 1);
if (network)
run_interactive(network, "Starting networking: %s", network);