From: Frank Brehm Date: Mon, 29 Jun 2020 12:01:12 +0000 (+0200) Subject: Adding and using snippets/tpl.270.remove-uek.sh X-Git-Tag: 2.1.2^2~5^2~3^2 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=59f17e5ee3730c23d43913487311ce7553861227;p=pixelpark%2Fcreate-vmware-tpl.git Adding and using snippets/tpl.270.remove-uek.sh --- diff --git a/kickstart/template-oel7.ks b/kickstart/template-oel7.ks index 4ff768e..f8e754d 100644 --- a/kickstart/template-oel7.ks +++ b/kickstart/template-oel7.ks @@ -226,6 +226,11 @@ echo echo "Using snippet $pkgs_snippet" $SNIPPET($pkgs_snippet) +#set $remove_uek_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.270.remove-uek.sh" +echo +echo "Using snippet $remove_uek_snippet" +$SNIPPET($remove_uek_snippet) + #set $create_motd_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.300.create-motd.sh" echo echo "Using snippet $create_motd_snippet" diff --git a/snippets/tpl.270.remove-uek.sh b/snippets/tpl.270.remove-uek.sh new file mode 100644 index 0000000..b3e8d86 --- /dev/null +++ b/snippets/tpl.270.remove-uek.sh @@ -0,0 +1,25 @@ +## !/bin/bash +#raw + +#----------------------------------------------------------- +remove_uek_packages() { + + echo + echo "${HASH_LINE}" + echo "Calling remove_uek_packages() ..." + echo + log "Switch kernel in /etc/sysconfig/kernel ..." + + sed -i -e 's/^\(DEFAULTKERNEL=\).*/\1kernel/i' /etc/sysconfig/kernel + + echo + log "Removing UEK packages ..." + + yum remove -y *-uek-* + +} + +remove_uek_packages + +#end raw +## vim: ts=4 et list