]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Adding and using snippets/tpl.270.remove-uek.sh
authorFrank Brehm <frank.brehm@pixelpark.com>
Mon, 29 Jun 2020 12:01:12 +0000 (14:01 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Mon, 29 Jun 2020 12:01:12 +0000 (14:01 +0200)
kickstart/template-oel7.ks
snippets/tpl.270.remove-uek.sh [new file with mode: 0644]

index 4ff768e9a57eca4a42ecce552cbccc6100799b10..f8e754d074968baf9062db0922fb1a1f5ea0f01a 100644 (file)
@@ -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 (file)
index 0000000..b3e8d86
--- /dev/null
@@ -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