From 52a3aa49805b9e79f1bfa5a9d909e12a42c7bca4 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 6 Jan 2024 18:36:32 +0100 Subject: [PATCH] Clear /tmp when booting This matches the behavior of most UNIX systems and ensures that the disk doesn't eventually fills entirely with unused temporary files. --- config/base.toml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/config/base.toml b/config/base.toml index 8917741..a3e606d 100644 --- a/config/base.toml +++ b/config/base.toml @@ -20,6 +20,10 @@ ptyd = {} [[files]] path = "/etc/init.d/00_base" data = """ +# clear and recreate tmpdir with 0o1777 permission +rm -r /tmp +mkdir -m a=rwxt /tmp + ipcd ptyd escalated @@ -86,13 +90,6 @@ path = "/share" data = "usr/share" symlink = true -## /tmp directory with special mode -[[files]] -path = "/tmp" -data = "" -directory = true -mode = 0o1777 - ## Device file symlinks [[files]] path = "/dev/null"