From patchwork Sun Feb 27 21:53:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 5290 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4K6HMC1nwGz3wtR for ; Sun, 27 Feb 2022 21:53:27 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4K6HM96fDsz3vv; Sun, 27 Feb 2022 21:53:25 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4K6HM95KrMz2yf0; Sun, 27 Feb 2022 21:53:25 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4K6HM73l0Lz2xbW for ; Sun, 27 Feb 2022 21:53:23 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4K6HM61wpxz3Yq for ; Sun, 27 Feb 2022 21:53:21 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1645998802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zwSnY/8gO8kdMtm0hR4Jeac3kKsk2CpiAVD5U2eS4GY=; b=2aS6A4NCcwQBxHpLC/o8Hx6okK/xoRhCsj1k/59GG8U+90us7dmQeuFu5tC0kYRv18g7oj Avuw5axKZxcmgyAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1645998802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zwSnY/8gO8kdMtm0hR4Jeac3kKsk2CpiAVD5U2eS4GY=; b=LdOU1Kg32P6SOcQ+WSJkOTulnt09vQ1q8pGVMIUDK0KEaf3LW+sPXE6k+KjKwShE0ieJS2 iNEv6GuoP+btv9RjdOl3QpbreGBmwPIBUvPwwRMP1uT6ykRrOq/nAyRgNOB0FsOsLh5gv1 +DCD/dt5EhbfV6MxQ7Qj5TRflRcL6Owfv874mT6wLH+gJ9l9XDu8TWiVz5EJxnE0WJDA4p zJ3bOGHyd+SiCae75D6iCAQAADqqtAgpcmibvlZ1pLkFcpHWL+g0wKFi8hpQY3j2pnX2Fz HhRJ+WMcD4BJAddW+htGBQeQObQZmJjXBmW52HV9ONbctd6kTIUOt4XSqNo63g== Message-ID: Date: Sun, 27 Feb 2022 21:53:14 +0000 MIME-Version: 1.0 Content-Language: en-US To: "IPFire: Development" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH] cleanfs: Clear /var/tmp on boot as well X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" 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üller --- 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=1 + boot_mesg -n " /var/tmp" ${NORMAL} + cd /var/tmp && + find . -xdev -mindepth 1 ! -name lost+found \ + -delete || failed=1 + boot_mesg -n " /var/ipfire/dhcp" ${NORMAL} cd /var/ipfire/dhcpc/ && find . -name "*.pid" -exec rm -f {} \; || failed=1 cd /var/ipfire/dhcpc/ && find . -name "*.cache" -exec rm -f {} \; || failed=1