chiark / gitweb /
tmpfiles: always recreate the most basic directory structure in /var
authorLennart Poettering <lennart@poettering.net>
Tue, 10 Jun 2014 22:12:21 +0000 (00:12 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 10 Jun 2014 22:12:21 +0000 (00:12 +0200)
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.

Makefile.am
src/tmpfiles/tmpfiles.c
tmpfiles.d/legacy.conf
tmpfiles.d/systemd.conf
tmpfiles.d/var.conf [new file with mode: 0644]

index c67f0634b19ef6c37734b8e641f197859630cb22..3ea95e94808c42f484d6de8c941ffbbac265b353 100644 (file)
@@ -1725,7 +1725,8 @@ dist_tmpfiles_DATA = \
        tmpfiles.d/systemd.conf \
        tmpfiles.d/systemd-nologin.conf \
        tmpfiles.d/tmp.conf \
-       tmpfiles.d/x11.conf
+       tmpfiles.d/x11.conf \
+       tmpfiles.d/var.conf
 
 if HAVE_SYSV_COMPAT
 dist_tmpfiles_DATA += \
index 89f6c6bd15696037e3004d2f2a6a886a93b45002..4c0f23e2ed53bb99991d01a8d635f7e089966e39 100644 (file)
@@ -750,7 +750,7 @@ static int create_item(Item *i) {
                 }
 
                 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;
                 }
 
index a1656873da5b955c1072e75ba87b22792014920b..32196723f93b81b07d0dd6815209d72497d35599 100644 (file)
@@ -11,6 +11,7 @@
 # systems.
 
 d /run/lock 0755 root root -
+L /var/lock - - - - ../run/lock
 
 # /run/lock/subsys is used for serializing SysV service execution, and
 # hence without use on SysV-less systems.
index 85dc35699da57305bba119fceeae71b654a7b9a2..9554f38d36d58a2f9903366678db2fdecf317d38 100644 (file)
 d /run/user 0755 root root ~10d
 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/seats 0755 root root -
 d /run/systemd/sessions 0755 root root -
diff --git a/tmpfiles.d/var.conf b/tmpfiles.d/var.conf
new file mode 100644 (file)
index 0000000..10d2e49
--- /dev/null
@@ -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 - - -