You are not logged in.
Pages: 1
Mine has some KDEcache crap in it right now, but I noticed it doesn't seem to be cleared at boot, like /tmp does:
/etc/sysinit.rc
...
stat_busy "Removing Leftover Files"
/bin/rm -f /etc/nologin &>/dev/null
/bin/rm -f /etc/shutdownpid &>/dev/null
/bin/rm -f /var/lock/* &>/dev/null
/bin/rm -rf /tmp/* /tmp/.* &>/dev/null
/bin/rm -f /forcefsck &>/dev/null
(cd /var/run && /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; )
: >| /var/run/utmp
/bin/chmod 0664 /var/run/utmp
# Keep {x,k,g}dm happy with xorg
/bin/mkdir /tmp/.ICE-unix && /bin/chmod 1777 /tmp/.ICE-unix
/bin/mkdir /tmp/.X11-unix && /bin/chmod 1777 /tmp/.X11-unix
stat_done
...
Does it ever get cleared? If not, why is it called "tmp"?
Offline
Offline
This is what I do:
$ sudo rm -rf /var/tmp
$ sudo ln -sf /tmp /var/tmp
Edit: And that's despite what it says in the FHS.
Last edited by azleifel (2010-04-23 19:31:37)
Offline
/etc/rc.tmpfs
#!/bin/sh
# Bind to already-existing tmpfs so we do not waste memory.
mkdir -p /dev/shm/{tmp,lock}
mount --bind /dev/shm/tmp /tmp
mount --bind /dev/shm/tmp /var/tmp
mount --bind /dev/shm/lock /var/lock
chmod 1777 /dev/shm/{tmp,lock}
/etc/rc.sysinit
#...
/bin/rm -f /forcefsck &>/dev/null
. /etc/rc.tmpfs
(cd /var/run && /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; )
#...
Last edited by Wintervenom (2010-04-23 20:25:29)
Offline
/etc/rc.tmpfs
/etc/rc.sysinit
What would be the best way to go about this in such a way that it would survive an update of the initscripts package?
Last edited by MkFly (2010-05-26 18:49:33)
Offline
Wintervenom wrote:/etc/rc.tmpfs
/etc/rc.sysinitWhat would be the best way to go about this in such a way that it would survive an update of the initscripts package?
Could just use /etc/rc.local
Offline
MkFly wrote:Wintervenom wrote:/etc/rc.tmpfs
/etc/rc.sysinitWhat would be the best way to go about this in such a way that it would survive an update of the initscripts package?
Could just use /etc/rc.local
Sure, but by that time, rc.sysinit has already written a few things to /tmp, not to mention whatever files are put there by daemons (which I believe should be up by the time we get to rc.local).
Offline
Any reason you're not just using fstab?
Offline
If I delete the contents of /var/tmp my user account fails to run my Gnome DE.
I have been messing around with encryption and:
1. Encrypted swap
2. Have /tmp setup in fstab as a tmpfs
3. Read somewhere that I can have leakage to /var/tmp as well. Not sure of the extent though.
Should /var/tmp rather be left alone or is there a way to get this done without borking anything?
Thanks,
Sage
Offline
Pages: 1