summaryrefslogtreecommitdiffstats
path: root/src/nspawn/nspawn-gperf.gperf
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-11-09 18:23:36 +0100
committerLennart Poettering <lennart@poettering.net>2021-11-09 18:32:15 +0100
commitd3689b94353d5f29b9d99d80bf6d888bd4eb70cc (patch)
tree179541a14e8158783d325bdb66193e8cc2ecc753 /src/nspawn/nspawn-gperf.gperf
parentnspawn: add helper settings_network_configured() (diff)
downloadsystemd-d3689b94353d5f29b9d99d80bf6d888bd4eb70cc.tar.xz
systemd-d3689b94353d5f29b9d99d80bf6d888bd4eb70cc.zip
nspawn: use three boolean fields from settings file when actually set
Let's turn these three fields into tristates, so that we can distinguish whether they are not configured at all from explicitly turned off. Let#s then use this to ensure that we only copy the settings fields into our execution environment if they are actually configured. We already do this for some of the boolean settings, this adds it for the missing ones. The goal here is to ensure that an empty settings file used in --settings=override mode (i.e. the default mode used in the systemd-nspawn@.service unit) is truly a NOP.
Diffstat (limited to 'src/nspawn/nspawn-gperf.gperf')
-rw-r--r--src/nspawn/nspawn-gperf.gperf6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nspawn/nspawn-gperf.gperf b/src/nspawn/nspawn-gperf.gperf
index 4af00c8d95..d25bef7468 100644
--- a/src/nspawn/nspawn-gperf.gperf
+++ b/src/nspawn/nspawn-gperf.gperf
@@ -20,7 +20,7 @@ struct ConfigPerfItem;
%includes
%%
Exec.Boot, config_parse_boot, 0, 0
-Exec.Ephemeral, config_parse_bool, 0, offsetof(Settings, ephemeral)
+Exec.Ephemeral, config_parse_tristate, 0, offsetof(Settings, ephemeral)
Exec.ProcessTwo, config_parse_pid2, 0, 0
Exec.Parameters, config_parse_strv, 0, offsetof(Settings, parameters)
Exec.Environment, config_parse_strv, 0, offsetof(Settings, environment)
@@ -34,7 +34,7 @@ Exec.MachineID, config_parse_id128, 0, of
Exec.WorkingDirectory, config_parse_path, 0, offsetof(Settings, working_directory)
Exec.PivotRoot, config_parse_pivot_root, 0, 0
Exec.PrivateUsers, config_parse_private_users, 0, 0
-Exec.NotifyReady, config_parse_bool, 0, offsetof(Settings, notify_ready)
+Exec.NotifyReady, config_parse_tristate, 0, offsetof(Settings, notify_ready)
Exec.SystemCallFilter, config_parse_syscall_filter, 0, 0,
Exec.LimitCPU, config_parse_rlimit, RLIMIT_CPU, offsetof(Settings, rlimit)
Exec.LimitFSIZE, config_parse_rlimit, RLIMIT_FSIZE, offsetof(Settings, rlimit)
@@ -59,7 +59,7 @@ Exec.CPUAffinity, config_parse_cpu_affinity, 0, 0
Exec.ResolvConf, config_parse_resolv_conf, 0, offsetof(Settings, resolv_conf)
Exec.LinkJournal, config_parse_link_journal, 0, 0
Exec.Timezone, config_parse_timezone, 0, offsetof(Settings, timezone)
-Exec.SuppressSync, config_parse_bool, 0, offsetof(Settings, suppress_sync)
+Exec.SuppressSync, config_parse_tristate, 0, offsetof(Settings, suppress_sync)
Files.ReadOnly, config_parse_tristate, 0, offsetof(Settings, read_only)
Files.Volatile, config_parse_volatile_mode, 0, offsetof(Settings, volatile_mode)
Files.Bind, config_parse_bind, 0, 0