From: Frank Brehm Date: Mon, 17 May 2021 10:31:53 +0000 (+0200) Subject: Adding and using snippets/tpl.075.tmp-tmpfs.sh X-Git-Tag: 2.2.6^2~1^2~3 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=b041f05d3ce24c72da55e69971c4b3a01567212d;p=pixelpark%2Fcreate-vmware-tpl.git Adding and using snippets/tpl.075.tmp-tmpfs.sh --- diff --git a/kickstart/template-oel7.ks b/kickstart/template-oel7.ks index 0067c8a..1fbbb78 100644 --- a/kickstart/template-oel7.ks +++ b/kickstart/template-oel7.ks @@ -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 index 0000000..ff8ae00 --- /dev/null +++ b/snippets/tpl.075.tmp-tmpfs.sh @@ -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