[ILUG] /tmp not cleared on reboot
Walter Faleiro
curtorkar at gmail.com
Wed Nov 29 23:46:13 GMT 2006
Hi Rick,
for the time being I wil only have rm -rf /tmp/* in the rc.local file
--W
On 11/30/06, Rick Moen <rick at linuxmafia.com> wrote:
>
> Quoting Walter Faleiro (curtorkar at gmail.com):
>
> > The rc.sysinit has this
> > # Do we need (w|u)tmpx files? We don't set them up, but the sysadmin
> > might...
> > [ -f /var/run/utmpx -o -f /var/log/wtmpx ] && _NEED_XFILES=1
> > # Clean up utmp/wtmp
> > >/var/run/utmp
> > touch /var/log/wtmp
> > chgrp utmp /var/run/utmp /var/log/wtmp
> > chmod 0664 /var/run/utmp /var/log/wtmp
> > > /var/run/utmpx
> > touch /var/log/wtmpx
> > chgrp utmp /var/run/utmpx /var/log/wtmpx
> > chmod 0664 /var/run/utmpx /var/log/wtmpx
> > rm -f /tmp/.X*-lock
> > rm -rf /tmp/.X*-unix
> > rm -rf /tmp/.ICE-unix
> > rm -f /tmp/.s.PGSQL.*
> >
> > So I understand an extra line shoud go rm -rf /tmp/*
> >
> > Not sure why they left it out.
>
> Probably because the daily tmpreaper cronjob actually meets people's
> needs in general more than well enough, and the above list is exactly
> the cruft that really _should_ be cleaned out during boot-up, lest
> problems in it interfere with X11.
>
> Frankly, I really hate it when any *IX simply clobbers /tmp's contents
> completely for no better reason than booting. I like to keep my
> short-term files there, and it's really vexing to lose them I forgot to
> make allowance for it being one of _those_ *IXes and took special steps
> to grab my files before the system could blow them away.
>
> If you do decide to emphatically blow away /tmp contents, be aware that
> "rm -rf /tmp/*" is nowhere near complete, as it misses all files and
> directories whose names start with dot. You can overcome this
> omission, but be very careful. E.g., do _not_ do "rm -rf /tmp/.?*" as
> root, or today's be the day you get to test your ability to restore from
> backup.
>
> --
> Irish Linux Users' Group mailing list
> About this list : http://mail.linux.ie/mailman/listinfo/ilug
> Who we are : http://www.linux.ie/
> Where we are : http://www.linux.ie/map/
>
More information about the ILUG
mailing list