mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 09:13:01 +02:00
confd: Avoid futile attempts to reload finit's config during boot
finit is not ready to accept the messages anyway, so we end up waiting for the 2s timeout (2 times). Since finit won't setup a utmp entry until it leaves runlevel S, we use that as the sync point for when finit is ready to receive reloads.
This commit is contained in:
committed by
Joachim Wiberg
parent
3ae4e1d9ca
commit
751b22f4db
@@ -17,6 +17,10 @@ static int startup_save_hook(sr_session_ctx_t *session, uint32_t sub_id, const c
|
||||
static int commit_done_hook(sr_session_ctx_t *session, uint32_t sub_id, const char *module,
|
||||
const char *xpath, sr_event_t event, unsigned request_id, void *priv)
|
||||
{
|
||||
/* No need to reload if the system is still bootstrapping. */
|
||||
if (system("runlevel >/dev/null"))
|
||||
return SR_ERR_OK;
|
||||
|
||||
if (system("initctl -nbq reload"))
|
||||
return SR_ERR_SYS;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user