From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: [PATCH] cleanfs: Clear /var/tmp on boot as well Date: Sun, 27 Feb 2022 21:53:14 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4981339577380074790==" List-Id: --===============4981339577380074790== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Similar to /tmp/, there is no reason to keep any leftovers in /var/tmp, nor can any application expect content placed there to be persistent. On several IPFire installations I have access to, this would remove quite some clutter accumulated in /var/tmp over the years. Signed-off-by: Peter M=C3=BCller --- src/initscripts/system/cleanfs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/initscripts/system/cleanfs b/src/initscripts/system/cleanfs index d1cbb2547..f315682ce 100644 --- a/src/initscripts/system/cleanfs +++ b/src/initscripts/system/cleanfs @@ -117,6 +117,11 @@ case "${1}" in find . -xdev -mindepth 1 ! -name lost+found \ -delete || failed=3D1 =20 + boot_mesg -n " /var/tmp" ${NORMAL} + cd /var/tmp && + find . -xdev -mindepth 1 ! -name lost+found \ + -delete || failed=3D1 + boot_mesg -n " /var/ipfire/dhcp" ${NORMAL} cd /var/ipfire/dhcpc/ && find . -name "*.pid" -exec rm -f {} \; || failed= =3D1 cd /var/ipfire/dhcpc/ && find . -name "*.cache" -exec rm -f {} \; || faile= d=3D1 --=20 2.34.1 --===============4981339577380074790==--