]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Adding and using snippets/tpl.075.tmp-tmpfs.sh
authorFrank Brehm <frank.brehm@pixelpark.com>
Mon, 17 May 2021 10:31:53 +0000 (12:31 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Mon, 17 May 2021 10:31:53 +0000 (12:31 +0200)
kickstart/template-oel7.ks
snippets/tpl.075.tmp-tmpfs.sh [new file with mode: 0644]

index 0067c8a4e270153436ef5fa481236767ea1ec4c8..1fbbb7837c99be29053994c9d0259c2b0e60ff0c 100644 (file)
@@ -192,6 +192,11 @@ echo
 echo "Using snippet $tweak_grub_snippet"
 $SNIPPET($tweak_grub_snippet)
 
+#set $setup_tmp_tmpfs_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.075.tmp-tmpfs.sh"
+echo
+echo "Using snippet $setup_tmp_tmpfs_snippet"
+$SNIPPET($setup_tmp_tmpfs_snippet)
+
 #set $tweak_rsyslog_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.080.rsyslogd-el7.sh"
 echo
 echo "Using snippet $tweak_rsyslog_snippet"
diff --git a/snippets/tpl.075.tmp-tmpfs.sh b/snippets/tpl.075.tmp-tmpfs.sh
new file mode 100644 (file)
index 0000000..ff8ae00
--- /dev/null
@@ -0,0 +1,23 @@
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+setup_tmp_tmpfs() {
+
+    local fstab="/etc/fstab"
+    if [[ -f "${fstab}" ]] ; then
+
+        echo
+        echo "${HASH_LINE}"
+        echo
+        log "Setting up /tmp as a tmpfs in '${fstab}' ..."
+
+        echo 'tmpfs    /tmp    tmpfs   nosuid,size=10% 0       0' >>"${fstab}"
+
+    fi
+
+}
+setup_tmp_tmpfs
+
+#end raw
+## vim: ts=4 et list