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
+4
View File
@@ -38,6 +38,7 @@
#include "uid-range.h"
#include "user-util.h"
#include "utf8.h"
#include "verbs.h"
typedef enum ItemType {
ADD_USER = 'u',
@@ -2282,6 +2283,9 @@ static int run(int argc, char *argv[]) {
if (arg_cat_flags != CAT_CONFIG_OFF)
return cat_config();
if (should_bypass("SYSTEMD_SYSUSERS"))
return 0;
umask(0022);
r = mac_init();