--- /dev/null
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+set_rsyslogd_el7() {
+
+ echo
+ echo "${HASH_LINE}"
+ echo "Calling set_rsyslogd_el7() ..."
+ echo
+ local url_top="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/rsyslog.conf"
+ local url_sub="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/50_rsyslog.conf.el7"
+
+ echo
+ log "Configuring Rsyslogd."
+
+ echo
+ log "Cleaning /etc/rsyslog.d ..."
+ if [[ -d /etc/rsyslog.d ]] ; then
+ local cfg_file=
+ for cfg_file in /etc/rsyslog.d/*.conf ; do
+ if [[ -f "${cfg_file}" ]] ; then
+ rm -fv "${cfg_file}"
+ fi
+ done
+ else
+ mkdir -pv /etc/rsyslog.d
+ fi
+
+ echo
+ log "Rewriting /etc/rsyslog.conf ..."
+
+ local tmp_file=$( mktemp )
+ wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url_top}" || true
+ if [[ -s "${tmp_file}" ]] ; then
+ cp -p /etc/rsyslog.conf /etc/rsyslog.conf.orig
+ mv -v "${tmp_file}" /etc/rsyslog.conf
+ chmod -v 0644 /etc/rsyslog.conf
+ fi
+ rm -fv "${tmp_file}"
+
+ echo
+ log "Rewriting /etc/rsyslog.d/50_rsyslog.conf ..."
+
+ tmp_file=$( mktemp )
+ wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url_sub}" || true
+ if [[ -s "${tmp_file}" ]] ; then
+ mv -v "${tmp_file}" /etc/rsyslog.d/50_rsyslog.conf
+ chmod -v 0644 /etc/rsyslog.d/50_rsyslog.conf
+ fi
+ rm -fv "${tmp_file}"
+
+}
+
+set_rsyslogd_el7
+
+#end raw
+## vim: ts=4 et list
--- /dev/null
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+set_rsyslogd_el8() {
+
+ echo
+ echo "${HASH_LINE}"
+ echo "Calling set_rsyslogd_el8() ..."
+ echo
+ local url_top="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/rsyslog.conf"
+ local url_sub="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/50_rsyslog.conf.el8"
+
+ echo
+ log "Configuring Rsyslogd."
+
+ echo
+ log "Cleaning /etc/rsyslog.d ..."
+ if [[ -d /etc/rsyslog.d ]] ; then
+ local cfg_file=
+ for cfg_file in /etc/rsyslog.d/*.conf ; do
+ if [[ -f "${cfg_file}" ]] ; then
+ rm -fv "${cfg_file}"
+ fi
+ done
+ else
+ mkdir -pv /etc/rsyslog.d
+ fi
+
+ echo
+ log "Rewriting /etc/rsyslog.conf ..."
+
+ local tmp_file=$( mktemp )
+ wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url_top}" || true
+ if [[ -s "${tmp_file}" ]] ; then
+ cp -p /etc/rsyslog.conf /etc/rsyslog.conf.orig
+ mv -v "${tmp_file}" /etc/rsyslog.conf
+ chmod -v 0644 /etc/rsyslog.conf
+ fi
+ rm -fv "${tmp_file}"
+
+ echo
+ log "Rewriting /etc/rsyslog.d/50_rsyslog.conf ..."
+
+ tmp_file=$( mktemp )
+ wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url_sub}" || true
+ if [[ -s "${tmp_file}" ]] ; then
+ mv -v "${tmp_file}" /etc/rsyslog.d/50_rsyslog.conf
+ chmod -v 0644 /etc/rsyslog.d/50_rsyslog.conf
+ fi
+ rm -fv "${tmp_file}"
+
+}
+
+set_rsyslogd_el8
+
+#end raw
+## vim: ts=4 et list