mirror of
https://github.com/troglobit/finit.git
synced 2026-11-08 16:11:10 +00:00
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:
1 parent
fc9758da8e
commit
71ac8bb802
2 files changed
+3
-5
No files matched your search
@@ -33,8 +33,6 @@ General
|
|||||||
for really low-end systems w/o `/etc/fstab`.
|
for really low-end systems w/o `/etc/fstab`.
|
||||||
* Fix `restart_any_lost_procs()`, currently it restarts task/run when
|
* Fix `restart_any_lost_procs()`, currently it restarts task/run when
|
||||||
called -- must check `SVC_CMD_SERVICE`, like `svc_monitor()` does.
|
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
|
Init
|
||||||
|
|||||||
@@ -195,6 +195,9 @@ int main(int argc, char* argv[])
|
|||||||
*/
|
*/
|
||||||
parse_finit_conf(FINIT_CONF);
|
parse_finit_conf(FINIT_CONF);
|
||||||
|
|
||||||
|
/* Set hostname as soon as possible, for syslog et al. */
|
||||||
|
set_hostname(&hostname);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mount filesystems
|
* Mount filesystems
|
||||||
*/
|
*/
|
||||||
@@ -234,9 +237,6 @@ int main(int argc, char* argv[])
|
|||||||
/* Setup kernel specific settings, e.g. allow broadcast ping, etc. */
|
/* Setup kernel specific settings, e.g. allow broadcast ping, etc. */
|
||||||
run("/sbin/sysctl -e -p /etc/sysctl.conf >/dev/null");
|
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);
|
ifconfig("lo", "127.0.0.1", "255.0.0.0", 1);
|
||||||
if (network)
|
if (network)
|
||||||
run_interactive(network, "Starting networking: %s", network);
|
run_interactive(network, "Starting networking: %s", network);
|
||||||
|
|||||||
Reference in new issue
Block a user