mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-27 01:55:32 +03:00
Merge pull request #15365 from poettering/remount-fs-pstore-fix
pid1: automatically generate systemd-remount-fs.service deps, plus enable systemd-pstore from sysinit.target
This commit is contained in:
commit
a1a11d5610
@ -1055,6 +1055,16 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) {
|
||||
if (!MANAGER_IS_SYSTEM(u->manager))
|
||||
return 0;
|
||||
|
||||
/* For the following three directory types we need write access, and /var/ is possibly on the root
|
||||
* fs. Hence order after systemd-remount-fs.service, to ensure things are writable. */
|
||||
if (!strv_isempty(c->directories[EXEC_DIRECTORY_STATE].paths) ||
|
||||
!strv_isempty(c->directories[EXEC_DIRECTORY_CACHE].paths) ||
|
||||
!strv_isempty(c->directories[EXEC_DIRECTORY_LOGS].paths)) {
|
||||
r = unit_add_dependency_by_name(u, UNIT_AFTER, SPECIAL_REMOUNT_FS_SERVICE, true, UNIT_DEPENDENCY_FILE);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
if (c->private_tmp) {
|
||||
const char *p;
|
||||
|
||||
|
@ -12,7 +12,6 @@ Description=Load/Save Screen Backlight Brightness of %i
|
||||
Documentation=man:systemd-backlight@.service(8)
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
After=systemd-remount-fs.service
|
||||
Before=sysinit.target shutdown.target
|
||||
|
||||
[Service]
|
||||
|
@ -12,7 +12,7 @@ Description=Process Core Dump
|
||||
Documentation=man:systemd-coredump(8)
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
After=systemd-remount-fs.service systemd-journald.socket
|
||||
After=systemd-journald.socket
|
||||
Requires=systemd-journald.socket
|
||||
Before=shutdown.target
|
||||
|
||||
|
@ -13,8 +13,8 @@ Documentation=man:systemd-pstore(8)
|
||||
ConditionDirectoryNotEmpty=/sys/fs/pstore
|
||||
ConditionVirtualization=!container
|
||||
DefaultDependencies=no
|
||||
Wants=systemd-remount-fs.service
|
||||
After=systemd-remount-fs.service
|
||||
Conflicts=shutdown.target
|
||||
Before=sysinit.target shutdown.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
@ -23,4 +23,4 @@ RemainAfterExit=yes
|
||||
StateDirectory=systemd/pstore
|
||||
|
||||
[Install]
|
||||
WantedBy=systemd-remount-fs.service
|
||||
WantedBy=sysinit.target
|
||||
|
@ -13,7 +13,7 @@ Documentation=man:systemd-rfkill.service(8)
|
||||
DefaultDependencies=no
|
||||
BindsTo=sys-devices-virtual-misc-rfkill.device
|
||||
Conflicts=shutdown.target
|
||||
After=sys-devices-virtual-misc-rfkill.device systemd-remount-fs.service
|
||||
After=sys-devices-virtual-misc-rfkill.device
|
||||
Before=shutdown.target
|
||||
|
||||
[Service]
|
||||
|
@ -13,7 +13,7 @@ Documentation=man:systemd-timesyncd.service(8)
|
||||
ConditionCapability=CAP_SYS_TIME
|
||||
ConditionVirtualization=!container
|
||||
DefaultDependencies=no
|
||||
After=systemd-remount-fs.service systemd-sysusers.service
|
||||
After=systemd-sysusers.service
|
||||
Before=time-set.target sysinit.target shutdown.target
|
||||
Conflicts=shutdown.target
|
||||
Wants=time-set.target time-sync.target
|
||||
|
Loading…
Reference in New Issue
Block a user