diff --git a/startup/rc.d/scripts/cleanup b/startup/rc.d/scripts/cleanup index 72142d1..a8069df 100755 --- a/startup/rc.d/scripts/cleanup +++ b/startup/rc.d/scripts/cleanup @@ -14,7 +14,9 @@ SourceIfNotEmpty /etc/sysconfig/system rm -f /fastboot /fsckoptions /forcefsck /halt /poweroff # Clean up /var -find /var/run/ /var/lock/ -type f -delete +find /run/ /run/lock/ -type f -delete +test ! -L /var/run/ && rm -fr /var/run +test ! -L /var/lock/ && rm -fr /var/lock rm -rf /tmp/.X*-lock /tmp/.ICE-unix /tmp/.X11-unix /tmp/.esd /tmp/.font-unix rm -f /tmp/esrv* @@ -43,6 +45,7 @@ if [ -n "$CLEAN_TMP" ] && [ "$CLEAN_TMP" -ge 1 ]; then fi systemd-tmpfiles --clean +systemd-tmpfiles --remove --create --boot --exclude-prefix=/dev # Possibly create lastlog, faillog, utmp and wtmp, reset utmp and possibly utmpx. for f in /var/log/{lastlog,faillog}; do @@ -59,6 +62,4 @@ done > /var/run/utmp test -f /var/run/utmpx && > /var/run/utmpx -systemd-tmpfiles --remove --create --boot --exclude-prefix=/dev - exit 0