]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Adding and using snippets/tpl.210.bashrc-centos8.sh
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 17 Jun 2020 11:52:08 +0000 (13:52 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 17 Jun 2020 11:52:08 +0000 (13:52 +0200)
kickstart/template-centos8.ks
snippets/tpl.210.bashrc-centos8.sh [new file with mode: 0644]

index e8d40597f5931743d23b333a56676d7571c5ca8f..4e65be04da7a69515e56d4e00629b13c167da9de 100644 (file)
@@ -195,6 +195,11 @@ echo
 echo "Using snippet $init_repos_snippet"
 $SNIPPET($init_repos_snippet)
 
+#set $bashrc_snippet = "per_status/" + $SYSTEM_STATUS + "/tpl.210.bashrc-centos8.sh"
+echo
+echo "Using snippet $bashrc_snippet"
+$SNIPPET($bashrc_snippet)
+
 
 
 
diff --git a/snippets/tpl.210.bashrc-centos8.sh b/snippets/tpl.210.bashrc-centos8.sh
new file mode 100644 (file)
index 0000000..2124f04
--- /dev/null
@@ -0,0 +1,27 @@
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+set_bashrc_centos8() {
+
+    echo
+    echo "${HASH_LINE}"
+    echo "Calling set_bashrc_centos8() ..."
+    echo
+    local url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/bashrc-centos8"
+
+    local tmp_file=$( mktemp )
+    wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true
+    if [[ -s "${tmp_file}" ]] ; then
+        cp -p /etc/bashrc /etc/bashrc.original
+        mv -v "${tmp_file}" /etc/bashrc
+        chmod -v 0644 /etc/bashrc
+    fi
+    rm -fv "${tmp_file}"
+
+}
+
+set_bashrc_centos8
+
+#end raw
+## vim: ts=4 et list