Add a few more bypass environment variables

When we're building ParticleOS images, we don't want the package
manager (or mkosi) to run systemd-sysusers, systemd-tmpfiles or
systemctl preset so let's add a few more bypass environment
variables that we can set to have execution of these skipped like
we already have $SYSTEMD_HWDB_UPDATE_BYPASS and $KERNEL_INSTALL_BYPASS.
This commit is contained in:
Daan De Meyer
2025-03-01 16:22:53 +01:00
parent 38701809a8
commit daa2547e31
9 changed files with 54 additions and 20 deletions
+1 -10
View File
@@ -1057,16 +1057,7 @@ static int context_execute(Context *c) {
}
static bool bypass(void) {
int r;
r = getenv_bool("KERNEL_INSTALL_BYPASS");
if (r < 0 && r != -ENXIO)
log_debug_errno(r, "Failed to parse $KERNEL_INSTALL_BYPASS, assuming no.");
if (r <= 0)
return false;
log_debug("$KERNEL_INSTALL_BYPASS is enabled, skipping execution.");
return true;
return should_bypass("KERNEL_INSTALL");
}
static int do_add(