[systemd-devel] [PATCH 08/10] units: make it possible to disable tmp.mount using systemctl

Jon Severinsson jon at severinsson.net
Wed Jul 16 03:09:54 PDT 2014


From: Michael Stapelberg <michael at stapelberg.de>

But enable it by default in make install and systemd preset.
---
 Makefile.am                     | 4 ++--
 system-preset/90-systemd.preset | 1 +
 units/tmp.mount                 | 3 +++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 94cd402..68f2c5b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5545,8 +5545,7 @@ SYSINIT_TARGET_WANTS += \
 	ldconfig.service
 
 LOCAL_FS_TARGET_WANTS += \
-	systemd-remount-fs.service \
-	tmp.mount
+	systemd-remount-fs.service
 
 MULTI_USER_TARGET_WANTS += \
 	getty.target \
@@ -5591,6 +5590,7 @@ USER_UNIT_ALIASES += \
 GENERAL_ALIASES += \
 	$(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
 	$(systemunitdir)/getty at .service $(pkgsysconfdir)/system/getty.target.wants/getty at tty1.service \
+	$(systemunitdir)/tmp.mount $(pkgsysconfdir)/system/local-fs.target.wants/tmp.mount \
 	$(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
 	$(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
 
diff --git a/system-preset/90-systemd.preset b/system-preset/90-systemd.preset
index e4a9e17..8169554 100644
--- a/system-preset/90-systemd.preset
+++ b/system-preset/90-systemd.preset
@@ -8,6 +8,7 @@
 # These ones should be enabled by default, even if distributions
 # generally follow a default-off policy.
 
+enable tmp.mount
 enable remote-fs.target
 enable getty at .service
 enable systemd-readahead-*
diff --git a/units/tmp.mount b/units/tmp.mount
index 00a0d28..8777171 100644
--- a/units/tmp.mount
+++ b/units/tmp.mount
@@ -19,3 +19,6 @@ What=tmpfs
 Where=/tmp
 Type=tmpfs
 Options=mode=1777,strictatime
+
+[Install]
+WantedBy=local-fs.target
-- 
2.0.1



More information about the systemd-devel mailing list