[systemd-commits] 3 commits - fixme Makefile.am units/.gitignore units/systemd-random-seed-load.service.in units/systemd-tmpfiles.service.in units/tmp.service units/var-lock.service units/var-run.service
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Sep 28 16:40:00 PDT 2010
Makefile.am | 17 ++++++-----------
fixme | 6 ++----
units/.gitignore | 1 +
units/systemd-random-seed-load.service.in | 3 +--
units/systemd-tmpfiles.service.in | 18 ++++++++++++++++++
units/tmp.service | 21 ---------------------
units/var-lock.service | 18 ------------------
units/var-run.service | 19 -------------------
8 files changed, 28 insertions(+), 75 deletions(-)
New commits:
commit 89a2f23dcfc9120e96acd11b9424414777a596e9
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Sep 29 01:39:54 2010 +0200
update fixme
diff --git a/fixme b/fixme
index b7de796..3e7f921 100644
--- a/fixme
+++ b/fixme
@@ -9,10 +9,6 @@ v11:
* emergency.service should start default.target after C-d. synchronize from fedora's initscripts package
-* stability promise must say that #ifdef TARGET_XXX style distro compatibility will go away one day
-
-* enable tmpfiles by default
-
later:
* do not throw error when .service file is linked to /dev/null
commit 93ca9714e6afa0adc2aa674e2505ca97ca5b91c9
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Sep 29 01:39:09 2010 +0200
units: get rid of special setup services for /var/run, /var/lock and /tmp, and rely on tmpfiles.d/ instead
diff --git a/Makefile.am b/Makefile.am
index fd163c8..b3ab550 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -181,11 +181,8 @@ dist_systemunit_DATA = \
units/sys-kernel-security.automount \
units/sys-kernel-security.mount \
units/tmp.mount \
- units/tmp.service \
units/var-lock.mount \
- units/var-lock.service \
units/var-run.mount \
- units/var-run.service \
units/hwclock-load.service \
units/hwclock-save.service \
units/sysctl.service \
@@ -1003,15 +1000,11 @@ install-data-hook:
rm -f systemd-remount-api-vfs.service \
remount-rootfs.service \
var-run.mount \
- var-run.service \
- var-lock.mount \
- var-lock.service && \
+ var-lock.mount && \
$(LN_S) ../systemd-remount-api-vfs.service systemd-remount-api-vfs.service && \
$(LN_S) ../remount-rootfs.service remount-rootfs.service && \
$(LN_S) ../var-run.mount var-run.mount && \
- $(LN_S) ../var-run.service var-run.service && \
- $(LN_S) ../var-lock.mount var-lock.mount && \
- $(LN_S) ../var-lock.service var-lock.service )
+ $(LN_S) ../var-lock.mount var-lock.mount )
( cd $(DESTDIR)$(sessionunitdir) && \
rm -f shutdown.target sockets.target local-fs.target swap.target bluetooth.target printer.target && \
$(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
@@ -1160,7 +1153,5 @@ git-tag:
# Opt out from a few services on Fedora for now, as long as rc.sysinit does this job
fedora: install
- rm /lib/systemd/system/local-fs.target.wants/var-run.service
rm /lib/systemd/system/local-fs.target.wants/var-run.mount
- rm /lib/systemd/system/local-fs.target.wants/var-lock.service
rm /lib/systemd/system/local-fs.target.wants/var-lock.mount
diff --git a/units/tmp.service b/units/tmp.service
deleted file mode 100644
index 2289239..0000000
--- a/units/tmp.service
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is part of systemd.
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-[Unit]
-Description=Temporary Directory
-DefaultDependencies=no
-Requires=tmp.mount
-After=tmp.mount
-Before=local-fs.target
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-ExecStart=/bin/mkdir -p -m1777 /tmp/.X11-unix /tmp/.ICE-unix ; -/sbin/restorecon /tmp/.X11-unix /tmp/.ICE-unix
-
-[Install]
-WantedBy=local-fs.target
diff --git a/units/var-lock.service b/units/var-lock.service
deleted file mode 100644
index c2e53cd..0000000
--- a/units/var-lock.service
+++ /dev/null
@@ -1,18 +0,0 @@
-# This file is part of systemd.
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-[Unit]
-Description=Lock Directory
-DefaultDependencies=no
-Requires=var-lock.mount
-After=var-lock.mount
-Before=local-fs.target
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-ExecStart=/bin/mkdir -p /var/lock/subsys
diff --git a/units/var-run.service b/units/var-run.service
deleted file mode 100644
index 2cb861e..0000000
--- a/units/var-run.service
+++ /dev/null
@@ -1,19 +0,0 @@
-# This file is part of systemd.
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-[Unit]
-Description=Runtime Directory
-DefaultDependencies=no
-Requires=var-run.mount
-After=var-run.mount
-Before=local-fs.target
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-ExecStart=/bin/touch /var/run/utmp ; /bin/chmod 0664 /var/run/utmp ; /bin/chown root:utmp /var/run/utmp
-ExecStart=/bin/mkdir /var/run/user ; /bin/chmod 0755 /var/run/user ; -/sbin/restorecon /var/run/user
commit afbf835326b0cc05c282b43f14ed501977de2004
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Sep 29 01:30:41 2010 +0200
units: ship unit file for systemd-tmpfiles by default
diff --git a/Makefile.am b/Makefile.am
index 973d341..fd163c8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -216,6 +216,7 @@ nodist_systemunit_DATA = \
units/systemd-random-seed-load.service \
units/systemd-readahead-collect.service \
units/systemd-readahead-replay.service \
+ units/systemd-tmpfiles.service \
units/syslog.target
dist_sessionunit_DATA = \
@@ -245,6 +246,7 @@ EXTRA_DIST = \
units/systemd-random-seed-load.service.in \
units/systemd-readahead-collect.service.in \
units/systemd-readahead-replay.service.in \
+ units/systemd-tmpfiles.service.in \
units/syslog.target.in \
units/session/exit.service.in \
systemd.pc.in
@@ -1054,6 +1056,7 @@ install-data-hook:
systemd-vconsole-setup.service \
systemd-modules-load.service \
systemd-random-seed-load.service \
+ systemd-tmpfiles.service \
sysctl.service \
tmpwatch.timer \
tmpwatch.service && \
@@ -1065,6 +1068,7 @@ install-data-hook:
$(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service && \
$(LN_S) ../systemd-modules-load.service systemd-modules-load.service && \
$(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service && \
+ $(LN_S) ../systemd-tmpfiles.service systemd-tmpfiles.service && \
$(LN_S) ../sysctl.service sysctl.service && \
$(LN_S) ../tmpwatch.timer tmpwatch.timer && \
$(LN_S) ../tmpwatch.service tmpwatch.service )
diff --git a/fixme b/fixme
index 4291269..b7de796 100644
--- a/fixme
+++ b/fixme
@@ -105,6 +105,8 @@ later:
* when /proc/self/mountinfo is not parsable, proceed with next line
+* beefed up tmpwatch that reads tmpfiles.d
+
External:
* place /etc/inittab with explaining blurb.
diff --git a/units/.gitignore b/units/.gitignore
index 1ae1f96..1b5b122 100644
--- a/units/.gitignore
+++ b/units/.gitignore
@@ -1,3 +1,4 @@
+systemd-tmpfiles.service
systemd-readahead-collect.service
systemd-readahead-replay.service
serial-getty at .service
diff --git a/units/systemd-random-seed-load.service.in b/units/systemd-random-seed-load.service.in
index d03f9b8..b103f52 100644
--- a/units/systemd-random-seed-load.service.in
+++ b/units/systemd-random-seed-load.service.in
@@ -9,9 +9,8 @@
Description=Load Random Seed
DefaultDependencies=no
Wants=local-fs.target
-After=local-fs.target
Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service
+After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target
Before=shutdown.target
[Service]
diff --git a/units/systemd-tmpfiles.service.in b/units/systemd-tmpfiles.service.in
new file mode 100644
index 0000000..f869195
--- /dev/null
+++ b/units/systemd-tmpfiles.service.in
@@ -0,0 +1,18 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Recreate Volatile Files and Directories
+DefaultDependencies=no
+Wants=local-fs.target
+After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target
+Before=shutdown.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@rootlibexecdir@/systemd-tmpfiles
More information about the systemd-commits
mailing list