aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/user-tmpfs
diff options
context:
space:
mode:
authorPS <p@0x53.net>2026-02-01 12:02:03 +0100
committerPS <p@0x53.net>2026-02-01 12:02:03 +0100
commit980c5408489a3a3a56e49c3873f1bce6a0155cad (patch)
tree91df5fa62e7eca03d04b8ed114b20b337b99a556 /src/bin/user-tmpfs
downloadgoetia-base-980c5408489a3a3a56e49c3873f1bce6a0155cad.tar.gz
goetia-base-980c5408489a3a3a56e49c3873f1bce6a0155cad.tar.bz2
goetia-base-980c5408489a3a3a56e49c3873f1bce6a0155cad.zip
version 0.2.0.0
Diffstat (limited to 'src/bin/user-tmpfs')
-rwxr-xr-xsrc/bin/user-tmpfs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/bin/user-tmpfs b/src/bin/user-tmpfs
new file mode 100755
index 0000000..02deb14
--- /dev/null
+++ b/src/bin/user-tmpfs
@@ -0,0 +1,17 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+importas -Si USER
+importas -SD 64m USER_TMPFSDIR_SIZE
+s6-envuidgid ${USER}
+importas -Si UID
+importas -Si GID
+
+if { mkdir -p @tmpfsdir@/@usrrundir@/${USER} }
+
+mount
+ -t tmpfs
+ -o mode=0755,size=${USER_TMPFSDIR_SIZE},uid=${UID},gid=${GID}
+ ${USER}-tmpfs
+ @tmpfsdir@/@usrrundir@/${USER}