--- /dev/null
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+get_repos_centos7() {
+
+ echo
+ echo "${HASH_LINE}"
+ echo "Calling get_repos_centos7() ..."
+ echo
+ local base_url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/repos/centos7"
+
+ local -a repos=('CentOS-Base' 'CentOS-CR' 'CentOS-fasttrack')
+ repos+=('epel' 'icinga' 'pixelpark' 'prometheus' 'puppet' 'wazuh')
+
+ local repo=
+ local url=
+ local tmp_file=
+ for repo in "${repos[@]}" ; do
+ echo "Ensuring repo '${repo}.repo'..."
+ url="${base_url}/${repo}.repo"
+ tmp_file=$( mktemp )
+ wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true
+ if [[ -s "${tmp_file}" ]] ; then
+ mv -v "${tmp_file}" "/etc/yum.repos.d/${repo}.repo"
+ fi
+ rm -fv "${tmp_file}"
+ done
+
+}
+get_repos_centos7
+
+#end raw
+++ /dev/null
-## !/bin/bash
-#raw
-
-#-----------------------------------------------------------
-get_repos_centos7() {
-
- echo
- echo "${HASH_LINE}"
- echo "Calling get_repos_centos8() ..."
- echo
- local base_url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/repos/centos7"
-
- local -a repos=('CentOS-Base' 'CentOS-CR' 'CentOS-fasttrack')
- repos+=('epel' 'icinga' 'pixelpark' 'prometheus' 'puppet' 'wazuh')
-
- local repo=
- local url=
- local tmp_file=
- for repo in "${repos[@]}" ; do
- echo "Ensuring repo '${repo}.repo'..."
- url="${base_url}/${repo}.repo"
- tmp_file=$( mktemp )
- wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true
- if [[ -s "${tmp_file}" ]] ; then
- mv -v "${tmp_file}" "/etc/yum.repos.d/${repo}.repo"
- fi
- rm -fv "${tmp_file}"
- done
-
-}
-get_repos_centos7
-
-#end raw
--- /dev/null
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+set_bashrc_el7() {
+
+ echo
+ echo "${HASH_LINE}"
+ echo "Calling set_bashrc_el7() ..."
+ echo
+ local url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/bashrc-el7"
+
+ 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
+ cp -p /etc/bashrc /etc/bashrc.original
+ mv -v "${tmp_file}" /etc/bashrc
+ chmod -v 0644 /etc/bashrc
+ fi
+ rm -fv "${tmp_file}"
+
+ echo
+ log "Installing bash-completion ..."
+ if yum install -y "bash-completion" ; then
+ :
+ else
+ echo "[$(date)]: Could not install bash-completion" | tee -a "${ERROR_POINTER}"
+ fi
+
+}
+
+set_bashrc_el7
+
+#end raw
+## vim: ts=4 et list
--- /dev/null
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+set_vimrc_el7() {
+
+ echo
+ echo "${HASH_LINE}"
+ echo "Calling set_vimrc_el7() ..."
+ echo
+ local url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/vimrc-el7"
+
+ echo
+ log "Rewriting /etc/vimrc ..."
+
+ 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/vimrc /etc/vimrc.original
+ mv -v "${tmp_file}" /etc/vimrc
+ chmod -v 0644 /etc/vimrc
+ fi
+ rm -fv "${tmp_file}"
+
+}
+
+set_vimrc_el7
+
+#end raw
+## vim: ts=4 et list
--- /dev/null
+## !/bin/bash
+#raw
+
+#-----------------------------------------------------------
+install_pkgs_el7() {
+
+ echo
+ echo "${HASH_LINE}"
+ echo "Calling install_pkgs_el7() ..."
+ echo
+ echo
+ log "Installing additional packages ..."
+ echo
+
+ local -a pkgs_add=('colordiff' 'p7zip' 'screen')
+ 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_el7
+
+#end raw
+## vim: ts=4 et list