From c2008e51efe3ac879fdd46be17db798c74240dba Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 17 Jun 2020 15:26:40 +0200 Subject: [PATCH] Adding and using snippets/tpl.250.pkgs-centos8.sh --- kickstart/template-centos8.ks | 4 ++++ snippets/tpl.250.pkgs-centos8.sh | 36 ++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 snippets/tpl.250.pkgs-centos8.sh diff --git a/kickstart/template-centos8.ks b/kickstart/template-centos8.ks index 4e65be0..f6b8294 100644 --- a/kickstart/template-centos8.ks +++ b/kickstart/template-centos8.ks @@ -200,6 +200,10 @@ echo echo "Using snippet $bashrc_snippet" $SNIPPET($bashrc_snippet) +#set $pkgs_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.250.pkgs-centos8.sh" +echo +echo "Using snippet $pkgs_snippet" +$SNIPPET($pkgs_snippet) diff --git a/snippets/tpl.250.pkgs-centos8.sh b/snippets/tpl.250.pkgs-centos8.sh new file mode 100644 index 0000000..a635bb1 --- /dev/null +++ b/snippets/tpl.250.pkgs-centos8.sh @@ -0,0 +1,36 @@ +## !/bin/bash +#raw + +#----------------------------------------------------------- +install_pkgs_centos8() { + + echo + echo "${HASH_LINE}" + echo "Calling install_pkgs_centos8() ..." + echo + echo + log "Installing additional packages ..." + echo + + local -a pkgs_add=('colordiff' 'p7zip' 'screen' 'NetworkManager-config-server') + local -a pkgs_remove=('nfs*' 'rpcbind') + + echo "Installing packages: ${pkgs_add[*]}" + yum install -y "${pkgs_add[@]}" + + echo + echo "Removing packages: ${pkgs_remove[*]}" + yum remove -y "${pkgs_remove[@]}" + + echo + echo "Creating /etc/gitconfig ..." + cat <<-EOF >/etc/gitconfig + [color] + ui = true + EOF +} + +install_pkgs_centos8 + +#end raw +## vim: ts=4 et list -- 2.39.5