how to set cleaning of /tmp folder during boot

In some previous versions of OpenSuse it was possible to define in /etc/configsys to clear /tmp folder during boot. I see that such an option is missing in Leap42.1 in /etc/sysconfig. How to do set my leap 42.1 to clear /tmp folder during each boot.?

Thanks,

veki


# cd /etc/tmpfiles.d
# cp /usr/lib/tmpfiles.d/tmp.conf .

and the edit “tmp.conf” to say what you want.

Here are my changes to that file:


-d /tmp 1777 root root -
-d /var/tmp 1777 root root -
+D /tmp 1777 root root 7d
+d /var/tmp 1777 root root 14d

The lines starting with “-” are the old values. The lines starting with “+” are the new. The “D” says to delete all on boot. The “7d” or “14d” are for deleting files after so many days. Documentation is found with:

man tmpfiles.d

Thanks a lot.