Assert <int/container> condition if we detect running in container

Useful both for troubleshooting and for triggering if:<int/container> tasks.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2023-10-14 08:37:15 +02:00
parent c8e0b6b9ef
commit f27998ae4f
+4
View File
@@ -695,6 +695,10 @@ int main(int argc, char *argv[])
cond_set_oneshot(plugin_hook_str(HOOK_BANNER));
cond_set_oneshot(plugin_hook_str(HOOK_ROOTFS_UP));
/* Some bootstrap tasks may need to know if we're in a container. */
if (in_container())
cond_set("int/container");
/*
* Initialize .conf system and load static /etc/finit.conf then
* tell the world what we used.