[projects/rc-scripts] Clean and recreate systemd tmpfiles (even if not using systemd).

arekm arekm at pld-linux.org
Wed Jan 15 15:07:36 CET 2020


commit a268fbbd235b78d863a4181bc1b7d5bdbbe3c1e4
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Jan 15 14:56:29 2020 +0100

    Clean and recreate systemd tmpfiles (even if not using systemd).

 rc.d/rc.sysinit | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 936244ba..083b0808 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -1029,6 +1029,8 @@ touch /var/log/wtmp
 chown root:utmp /var/run/utmp /var/log/wtmp
 chmod 0664 /var/run/utmp /var/log/wtmp
 
+[ -x /bin/systemd-tmpfiles ] && /bin/systemd-tmpfiles --clean --boot
+
 # Clean /tmp
 if is_yes "$CLEAN_TMP" && ! is_fsmounted tmpfs /tmp; then
 	LC_ALL=C rm -rf /tmp/* /tmp/.[a-zA-Z0-9]*
@@ -1039,6 +1041,8 @@ mkdir -m 1777 -p /tmp/.ICE-unix > /dev/null 2>&1
 chown root:root /tmp/.ICE-unix
 is_yes "$SELINUX" && restorecon /tmp/.ICE-unix >/dev/null 2>&1
 
+[ -x /bin/systemd-tmpfiles ] && /bin/systemd-tmpfiles --create --boot
+
 test -d /var/run/netreport || mkdir -m 770 /var/run/netreport
 
 if ! is_yes "$VSERVER"; then
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/rc-scripts.git/commitdiff/a268fbbd235b78d863a4181bc1b7d5bdbbe3c1e4



More information about the pld-cvs-commit mailing list