mirror of
https://github.com/systemd/systemd.git
synced 2025-01-05 13:18:06 +03:00
b42482af90
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.
31 lines
977 B
Desktop File
31 lines
977 B
Desktop File
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
#
|
|
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
[Unit]
|
|
Description=Create Volatile Files and Directories
|
|
Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
|
|
|
|
DefaultDependencies=no
|
|
After=local-fs.target systemd-sysusers.service systemd-journald.service
|
|
Before=sysinit.target
|
|
Conflicts=shutdown.target initrd-switch-root.target
|
|
Before=shutdown.target initrd-switch-root.target
|
|
RefuseManualStop=yes
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=systemd-tmpfiles --create --remove --boot
|
|
SuccessExitStatus=DATAERR CANTCREAT
|
|
LoadCredential=tmpfiles.extra
|
|
LoadCredential=login.motd
|
|
LoadCredential=login.issue
|
|
LoadCredential=network.hosts
|
|
LoadCredential=ssh.authorized_keys.root
|