When is /var symlinked to /tmp?

I’m mildly perplexed.

I read this:

https://wiki.openwrt.org/doc/techref/process.boot

And it says:

This guide shall help you understand:

  • When does the tmpfs get mounted and /tmp symlinked to it and /var symlinked to /tmp?

And yet I read it all and did not understand that? Grrrr …

So when is /var symlinked to /tmp?

Moreover, I’d like to symlink it to a mounted hard disk so that I can have persistent logs. Where can I tweak the config to do that in an appropriate way at startup? i.e. before anything starts writing to /var?

Its probably easier to redirect the log files…

Probably, but not as clean IMO. Still interested in the “hard” way. Which can’t be that hard. As teh doc says, it’s easy to understand when this happens, alas not from my reading of the doc ;-).

Alas I did grep -r ln * | grep var in both /etc and /lib but can’t find a snippet of code that makes the link.