diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-10-09 19:02:27 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-05-23 15:09:39 +0200 |
commit | b42482af904ae0b94a6e4501ec595448f0ba1c06 (patch) | |
tree | 623250e27668fbed096def0e6d4eea1867361c57 /units/systemd-tmpfiles-setup.service | |
parent | man: extend description of --boot (diff) | |
download | systemd-b42482af904ae0b94a6e4501ec595448f0ba1c06.tar.xz systemd-b42482af904ae0b94a6e4501ec595448f0ba1c06.zip |
units: create /dev with --graceful first, allow sysusers to run later
We want to call systemd-tmpfiles-setup-dev.service to create /dev/fuse and
other device nodes so that module probing will work. But it is possible that
when we're in first boot, some users or groups need to be created by
systemd-sysusers first. But it is also possible that systemd-sysusers cannot
actually execute configuration because the root partition is not fully writable
yet. So let systemd-tmpfiles-setup-dev.service run earlier, possibly without
all users and groups in place. Since systemd-tmpfiles-setup-dev.service writes
to /dev only, it doesn't care how the root partition is mounted. In this early
run, some some nodes might be created with default permissions (i.e. not
accessible to non-root users or groups). This should be OK for the early boot
phase. Afterwards, we let systemd-tmpfiles-setup.service execute full
configuration. We will configure any files in /dev twice, but considering that
there's only a few of them and that the second run should only adjust ownership
and permissions, this should be OK. This way, we avoid the dependency loop.
Diffstat (limited to 'units/systemd-tmpfiles-setup.service')
-rw-r--r-- | units/systemd-tmpfiles-setup.service | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/units/systemd-tmpfiles-setup.service b/units/systemd-tmpfiles-setup.service index a420465534..506f53eaa2 100644 --- a/units/systemd-tmpfiles-setup.service +++ b/units/systemd-tmpfiles-setup.service @@ -21,7 +21,7 @@ RefuseManualStop=yes [Service] Type=oneshot RemainAfterExit=yes -ExecStart=systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev +ExecStart=systemd-tmpfiles --create --remove --boot SuccessExitStatus=DATAERR CANTCREAT LoadCredential=tmpfiles.extra LoadCredential=login.motd |