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 1/2] 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" From fc4a6d43c6ed35fd21e5d0669815b41ea48a53b7 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Mon, 8 Jan 2024 17:11:22 +0100 Subject: [PATCH 2/2] Add uutils to base --- config/base.toml | 1 + config/resist.toml | 1 - config/server-minimal.toml | 1 - config/server.toml | 1 - 4 files changed, 1 insertion(+), 3 deletions(-) diff --git a/config/base.toml b/config/base.toml index a3e606d..8b32531 100644 --- a/config/base.toml +++ b/config/base.toml @@ -15,6 +15,7 @@ initfs = {} ipcd = {} kernel = {} ptyd = {} +uutils = {} ## Configuration files [[files]] diff --git a/config/resist.toml b/config/resist.toml index 64b617f..caa4e41 100644 --- a/config/resist.toml +++ b/config/resist.toml @@ -20,7 +20,6 @@ gnu-make = {} netdb = {} resist = {} userutils = {} -uutils = {} # Override to not background dhcpd [[files]] diff --git a/config/server-minimal.toml b/config/server-minimal.toml index b1bf6e5..673edfa 100644 --- a/config/server-minimal.toml +++ b/config/server-minimal.toml @@ -14,7 +14,6 @@ extrautils = {} ion = {} smith = {} userutils = {} -uutils = {} [[files]] path = "/etc/init.d/30_console" diff --git a/config/server.toml b/config/server.toml index 0219416..a63f232 100644 --- a/config/server.toml +++ b/config/server.toml @@ -29,7 +29,6 @@ resist = {} smith = {} terminfo = {} userutils = {} -uutils = {} vim = {} [[files]]