From b55a609834dcff9520999388a8edfbfdb3793285 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 13 Dec 2017 13:21:51 +0100 Subject: [PATCH] Handle /etc overlayfs: reload /etc/finit.d/*.conf after `mount -a` Systems running OverlayFS, or similar, on /etc may have new/modified .conf files in /etc/finit.d. This patch makes sure to reload them after `mount -a` has run so any configured bootstrap tasks and the new hook callback scripts may run as expected. Signed-off-by: Joachim Nilsson --- src/finit.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/finit.c b/src/finit.c index f47ee252..3238d9f7 100644 --- a/src/finit.c +++ b/src/finit.c @@ -422,6 +422,14 @@ int main(int argc, char* argv[]) /* Base FS up, enable standard SysV init signals */ sig_setup(&loop); + /* + * Reload all *.conf in /etc/finit.d, the mount command (above) + * may have brought in new files (overlayfs). + * + * XXX: Can we detect remounted /etc to trigger this instead? + */ + conf_reload_dynamic(); + _d("Base FS up, calling hooks ..."); plugin_run_hooks(HOOK_BASEFS_UP);