From e6c21e612838581c53c7742eb6071697f2d9e5a3 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 23 Jul 2011 22:21:35 -0400 Subject: arch-tmpfiles: add new script to handle volatile file control This is the same concept as systemd's tmpfiles handling, slightly simplified to avoid timed re-triggering of file cleaning. Most of our current file cleaning that takes place in rc.single and rc.sysinit is replaced by this, with the exception that we hold onto the /var/lock and /var/run for finer control, since we still check for the possibility of these directories being symlinks and adjust accordingly. Signed-off-by: Dave Reisner --- functions | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'functions') diff --git a/functions b/functions index 1cfcf28..16cf898 100644 --- a/functions +++ b/functions @@ -420,16 +420,13 @@ mount_all() { remove_leftover() { stat_busy "Removing Leftover Files" - rm -rf /etc/{nologin,shutdownpid} /forcefsck /tmp/* /tmp/.[^.]* /tmp/..?* /var/run/daemons + # handle this separately until we declare the non-symlinks obsoleted [[ ! -L /var/lock ]] && rm -rf /var/lock/* if [[ ! -L /var/run && -d /var/run ]]; then find /var/run/ \! -type d -delete ln -s /run/daemons /var/run/daemons fi - install -Tm 0664 -o root -g utmp <(:) /var/run/utmp - # Keep {x,k,g}dm happy with xorg - mkdir -m 1777 /tmp/.{X11,ICE}-unix - stat_done + /usr/lib/initscripts/arch-tmpfiles && stat_done || stat_fail } bootlogd_stop() { -- cgit v1.2.3