From b041f05d3ce24c72da55e69971c4b3a01567212d Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Mon, 17 May 2021 12:31:53 +0200 Subject: [PATCH] Adding and using snippets/tpl.075.tmp-tmpfs.sh --- kickstart/template-oel7.ks | 5 +++++ snippets/tpl.075.tmp-tmpfs.sh | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 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 -- 2.39.5