From 5c4e986400f940b842ab6b69ea28a71131f55e10 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Fri, 19 Jun 2020 11:02:37 +0200 Subject: [PATCH] Adding and using snippets/tpl.350.legato.sh --- kickstart/template-centos8.ks | 5 +++++ snippets/tpl.350.legato.sh | 39 +++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 snippets/tpl.350.legato.sh diff --git a/kickstart/template-centos8.ks b/kickstart/template-centos8.ks index 49f672d..5218ade 100644 --- a/kickstart/template-centos8.ks +++ b/kickstart/template-centos8.ks @@ -217,6 +217,11 @@ echo echo "Using snippet $create_motd_snippet" $SNIPPET($create_motd_snippet) +#set $legato_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.350.legato.sh" +echo +echo "Using snippet $legato_snippet" +$SNIPPET($legato_snippet) + diff --git a/snippets/tpl.350.legato.sh b/snippets/tpl.350.legato.sh new file mode 100644 index 0000000..b9533f4 --- /dev/null +++ b/snippets/tpl.350.legato.sh @@ -0,0 +1,39 @@ +## !/bin/bash +#raw + +#----------------------------------------------------------- +install_legato() { + + echo + echo "${HASH_LINE}" + echo "Calling install_legato() ..." + echo + echo + log "Installing Legato networker client packages (backup) ..." + echo + + local url_client="${COBBLER_URL}/custom/legato/lgtoclnt-latest.x86_64.rpm" + local url_man="${COBBLER_URL}/custom/legato/lgtoman-latest.x86_64.rpm" + + echo "Installing from URL '${url_client}' ..." + if yum install -y "${url_client}" ; then + : + else + echo "[$(date)]: Could not install from ${url_client}" | tee -a "${ERROR_POINTER}" + fi + echo "Installing from URL '${url_man}' ..." + if yum install -y "${url_man}" ; then + : + else + echo "[$(date)]: Could not install from ${url_man}" | tee -a "${ERROR_POINTER}" + fi + + mkdir -pv /nsr/res + echo "legato01.pixelpark.com" > /nsr/res/servers + +} + +install_legato + +#end raw +## vim: ts=4 et list -- 2.39.5