echo "Using snippet $pkgs_snippet"
$SNIPPET($pkgs_snippet)
+#set $create_motd_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.300.create-motd.sh"
+echo
+echo "Using snippet $create_motd_snippet"
+$SNIPPET($create_motd_snippet)
+
echo
local url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/bashrc-centos8"
+ echo
+ log "Rewriting /etc/bashrc ..."
+
local tmp_file=$( mktemp )
wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true
if [[ -s "${tmp_file}" ]] ; then
--- /dev/null
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+create_motd() {
+
+ echo
+ echo "${HASH_LINE}"
+ echo "Calling create_motd() ..."
+ echo
+ local url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/create-motd.sh"
+
+ echo
+ log "Creating initial /etc/motd ..."
+
+ local mk_script=$( mktemp -p /tmp "mk_create_motd.XXXXXXXXXX.ksh" )
+ if wget -O "${mk_script}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" ; then
+ chmod 0755 "${mk_script}"
+ "${mk_script}" > /etc/motd
+ else
+ echo "[$(date)]: Could not get 'mk_create_motd.ksh' from '${url}'." | tee -a "${ERROR_POINTER}"
+ fi
+ rm -fv "${mk_script}"
+
+}
+
+create_motd
+
+#end raw
+## vim: ts=4 et list