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 <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-12-13 17:58:48 +01:00
parent 60eccbac31
commit b55a609834
+8
View File
@@ -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);