This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Subject: Re: clean /tmp on reboot? From: Steve Borho <sborho@ststech.com> Date: Tue, 29 Jun 1999 16:56:51 -0500 On Tue, Jun 29, 1999 at 03:03:06PM -0600, Kurt Wall wrote: > Also sprach Dave Reed: > > Put the following line in your /etc/rc.d/rc.local file: > > /bin/rm -rf /tmp/* > > Cool, unless some script-kiddie, or worse, symlinks a file or dir in /tmp > to, say, /. This is not as trivial a problem as it seems. It requires > some thought to decide what files to clear and under what circumstances. > At the very least, I'd keep it from deleting links, and send root some > email to have a look. rm doesn't follow symlinks. It deletes the symlinks themselves. > > rc.local is executed when the system starts. rc.sysinit is probably a better place for this statement, since it's already rm'ing a bunch of files in there: gauss% grep rm /etc/rc.d/rc.sysinit rm -f /lib/modules/preferred rm -f /lib/modules/default rm -f /etc/mtab~ /fastboot /fsckoptions /forcefsck rm -f /var/lock/console.lock rm -f /var/lock/console/* rm -f /var/lock/LCK* rm -f /var/lock/subsys/* rm -f /var/run/*.pid rm -f /tmp/.X*-lock rm -f /tmp/.s.PGSQL.* ===