From: Arkadiusz Miƛkiewicz Date: Wed, 15 Jan 2020 13:56:29 +0000 (+0100) Subject: Clean and recreate systemd tmpfiles (even if not using systemd). X-Git-Tag: 0.4.19~2 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=a268fbbd235b78d863a4181bc1b7d5bdbbe3c1e4;p=projects%2Frc-scripts.git Clean and recreate systemd tmpfiles (even if not using systemd). --- 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