diff --git a/TODO.md b/TODO.md index dae633b4..5c8a4238 100644 --- a/TODO.md +++ b/TODO.md @@ -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 diff --git a/finit.c b/finit.c index 0efec2d1..1a13a3cf 100644 --- a/finit.c +++ b/finit.c @@ -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);