mirror of
https://github.com/systemd/systemd.git
synced 2025-02-25 21:57:32 +03:00
tmpfiles: always recreate the most basic directory structure in /var
Let's allow booting up with /var empty. Only create the most basic directories to get to a working directory structure and symlink set in /var.
This commit is contained in:
parent
61147436a3
commit
9339db7187
@ -1725,7 +1725,8 @@ dist_tmpfiles_DATA = \
|
|||||||
tmpfiles.d/systemd.conf \
|
tmpfiles.d/systemd.conf \
|
||||||
tmpfiles.d/systemd-nologin.conf \
|
tmpfiles.d/systemd-nologin.conf \
|
||||||
tmpfiles.d/tmp.conf \
|
tmpfiles.d/tmp.conf \
|
||||||
tmpfiles.d/x11.conf
|
tmpfiles.d/x11.conf \
|
||||||
|
tmpfiles.d/var.conf
|
||||||
|
|
||||||
if HAVE_SYSV_COMPAT
|
if HAVE_SYSV_COMPAT
|
||||||
dist_tmpfiles_DATA += \
|
dist_tmpfiles_DATA += \
|
||||||
|
@ -750,7 +750,7 @@ static int create_item(Item *i) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!streq(i->argument, x)) {
|
if (!streq(i->argument, x)) {
|
||||||
log_error("%s is not the right symlinks.", i->path);
|
log_error("%s is not the right symlink.", i->path);
|
||||||
return -EEXIST;
|
return -EEXIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# systems.
|
# systems.
|
||||||
|
|
||||||
d /run/lock 0755 root root -
|
d /run/lock 0755 root root -
|
||||||
|
L /var/lock - - - - ../run/lock
|
||||||
|
|
||||||
# /run/lock/subsys is used for serializing SysV service execution, and
|
# /run/lock/subsys is used for serializing SysV service execution, and
|
||||||
# hence without use on SysV-less systems.
|
# hence without use on SysV-less systems.
|
||||||
|
@ -10,11 +10,6 @@
|
|||||||
d /run/user 0755 root root ~10d
|
d /run/user 0755 root root ~10d
|
||||||
F! /run/utmp 0664 root utmp -
|
F! /run/utmp 0664 root utmp -
|
||||||
|
|
||||||
f /var/log/wtmp 0664 root utmp -
|
|
||||||
f /var/log/btmp 0600 root utmp -
|
|
||||||
|
|
||||||
d /var/cache/man - - - 30d
|
|
||||||
|
|
||||||
d /run/systemd/ask-password 0755 root root -
|
d /run/systemd/ask-password 0755 root root -
|
||||||
d /run/systemd/seats 0755 root root -
|
d /run/systemd/seats 0755 root root -
|
||||||
d /run/systemd/sessions 0755 root root -
|
d /run/systemd/sessions 0755 root root -
|
||||||
|
20
tmpfiles.d/var.conf
Normal file
20
tmpfiles.d/var.conf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
# See tmpfiles.d(5) for details
|
||||||
|
|
||||||
|
L /var/run - - - - ../run
|
||||||
|
|
||||||
|
d /var/log 0755 - - -
|
||||||
|
f /var/log/wtmp 0664 root utmp -
|
||||||
|
f /var/log/btmp 0600 root utmp -
|
||||||
|
|
||||||
|
d /var/cache 0755 - - -
|
||||||
|
d /var/cache/man - - - 30d
|
||||||
|
|
||||||
|
d /var/lib 0755 - - -
|
||||||
|
d /var/spool 0755 - - -
|
Loading…
x
Reference in New Issue
Block a user