OPNsense Forum

English Forums => Development and Code Review => Topic started by: aa on June 21, 2015, 05:58:09 pm

Title: [SOLVED] /tmp and /var/tmp
Post by: aa on June 21, 2015, 05:58:09 pm
Just for consideration, FreeBSD uses /var/tmp for temporary objects
that expected to be living/survive between reboot.

I'm not sure about OPNsense, but pfSense symlinked /tmp to /var/tmp,
even on full install, which I think defeated the original purpose.
Title: Re: /tmp and /var/tmp
Post by: franco on June 21, 2015, 06:46:27 pm
There is no symlink, but the rc system still clears /var/tmp at startup. I've removed the only usage of /var/tmp (unbound code), but I won't remove the /var/tmp wipe at startup right away.

Please also note that using MFS on /var will make /var/tmp not survive a reboot as well.
Title: Re: /tmp and /var/tmp
Post by: franco on June 22, 2015, 08:01:27 am
Tested this, and it looks good.

/var/tmp (as well as /var/run and /var/etc) are not being cleaned on boot anymore in time for 15.7: https://github.com/opnsense/core/commit/8e77138ab864a4fb9540804f7ac0dff45982864d