From: Frank Brehm Date: Thu, 14 Mar 2024 17:34:23 +0000 (+0100) Subject: Creating /etc/systemd/system/tmp.mount.d/mount_options.conf in snippets/tpl.075.tmp... X-Git-Tag: 3.2.4~1^2~1 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=4e5bdf837640e917165ef41a446f7e2ede4fb6c3;p=pixelpark%2Fcreate-vmware-tpl.git Creating /etc/systemd/system/tmp.mount.d/mount_options.conf in snippets/tpl.075.tmp-tmpfs.sh --- diff --git a/snippets/tpl.075.tmp-tmpfs.sh b/snippets/tpl.075.tmp-tmpfs.sh index e16c8fa..c159e8c 100644 --- a/snippets/tpl.075.tmp-tmpfs.sh +++ b/snippets/tpl.075.tmp-tmpfs.sh @@ -10,7 +10,22 @@ setup_tmp_tmpfs() { echo log "Setting up /tmp as a tmpfs by a systemd mount unit ..." echo + if [[ ! -d /etc/systemd/system/tmp.mount.d ]] ; then + echo "Creating /etc/systemd/system/tmp.mount.d ..." + mkdir -pv /etc/systemd/system/tmp.mount.d + echo + fi + echo "Creating /etc/systemd/system/tmp.mount.d/mount_options.conf ..." + echo + cat <<-EOF >"/etc/systemd/system/tmp.mount.d/mount_options.conf" + [Mount] + Options=mode=1777,strictatime,nosuid,nodev,size=10%%,nr_inodes=1m + EOF + echo + echo "Content of /etc/systemd/system/tmp.mount.d/mount_options.conf:" + cat /etc/systemd/system/tmp.mount.d/mount_options.conf + echo echo "Enabling unit tmp.mount ..." systemctl enable tmp.mount