packages: systemd/systemd.spec, systemd/pld-clean-tmp.service (NEW), system...

glen glen at pld-linux.org
Thu Mar 29 09:02:47 CEST 2012


Author: glen                         Date: Thu Mar 29 07:02:47 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- add handler for $CLEAN_TMP

---- Files affected:
packages/systemd:
   systemd.spec (1.140 -> 1.141) , pld-clean-tmp.service (NONE -> 1.1)  (NEW), pld-clean-tmp.sh (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/systemd/systemd.spec
diff -u packages/systemd/systemd.spec:1.140 packages/systemd/systemd.spec:1.141
--- packages/systemd/systemd.spec:1.140	Wed Mar 28 23:56:47 2012
+++ packages/systemd/systemd.spec	Thu Mar 29 09:02:41 2012
@@ -31,6 +31,8 @@
 Source11:	pld-storage-init.service
 Source12:	pld-wait-storage.service
 Source13:	pld-storage-init.sh
+Source14:	pld-clean-tmp.service
+Source15:	pld-clean-tmp.sh
 Patch0:		target-pld.patch
 Patch1:		config-pld.patch
 Patch2:		shut-sysv-up.patch
@@ -381,10 +383,13 @@
 cp -p %{SOURCE10} $RPM_BUILD_ROOT%{systemdunitdir}/pld-storage-init-late.service
 cp -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}/pld-storage-init.service
 cp -p %{SOURCE12} $RPM_BUILD_ROOT%{systemdunitdir}/pld-wait-storage.service
+cp -p %{SOURCE14} $RPM_BUILD_ROOT%{systemdunitdir}/pld-clean-tmp.service
 install -p %{SOURCE13} $RPM_BUILD_ROOT/lib/systemd/pld-storage-init
+install -p %{SOURCE15} $RPM_BUILD_ROOT/lib/systemd/pld-clean-tmp
 
-ln -s ../pld-storage-init-late.service $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants/pld-storage-init-late.service
-ln -s ../pld-storage-init.service $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants/pld-storage-init.service
+ln -s ../pld-storage-init-late.service $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants
+ln -s ../pld-storage-init.service $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants
+ln -s ../pld-clean-tmp.service $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants
 
 # handled by rc-local sysv service, no need for generator
 %{__rm} $RPM_BUILD_ROOT/lib/systemd/system-generators/systemd-rc-local-generator
@@ -765,6 +770,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.141  2012/03/29 07:02:41  glen
+- add handler for $CLEAN_TMP
+
 Revision 1.140  2012/03/28 21:56:47  glen
 - network initscript needs /var/lock/subsys dir; so depend on systemd-tmpfiles-setup.service
 

================================================================
Index: packages/systemd/pld-clean-tmp.service
diff -u /dev/null packages/systemd/pld-clean-tmp.service:1.1
--- /dev/null	Thu Mar 29 09:02:47 2012
+++ packages/systemd/pld-clean-tmp.service	Thu Mar 29 09:02:41 2012
@@ -0,0 +1,14 @@
+[Unit]
+Description=Clean /tmp on startup
+DefaultDependencies=no
+After=remount-rootfs.service
+
+[Service]
+ExecStart=/lib/systemd/pld-clean-tmp
+Type=oneshot
+TimeoutSec=0
+RemainAfterExit=yes
+StandardOutput=journal+console
+
+[Install]
+WantedBy=basic.target

================================================================
Index: packages/systemd/pld-clean-tmp.sh
diff -u /dev/null packages/systemd/pld-clean-tmp.sh:1.1
--- /dev/null	Thu Mar 29 09:02:47 2012
+++ packages/systemd/pld-clean-tmp.sh	Thu Mar 29 09:02:41 2012
@@ -0,0 +1,8 @@
+#!/bin/sh
+# Read functions
+. /lib/rc-scripts/functions
+
+# Clean /tmp
+if is_yes "$CLEAN_TMP" && ! is_fsmounted tmpfs /tmp; then
+	LC_ALL=C rm -rf /tmp/* /tmp/.[a-zA-Z0-9]*
+fi
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/systemd/systemd.spec?r1=1.140&r2=1.141



More information about the pld-cvs-commit mailing list