From: Reinhard Schmitz Date: Wed, 8 Nov 2023 11:41:19 +0000 (+0100) Subject: Remove terraform usage X-Git-Tag: 3.2.1~25^2~1^2 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=cfdbc2c1b625f8349d8241579a4672feda741a88;p=pixelpark%2Fcreate-vmware-tpl.git Remove terraform usage --- diff --git a/bin/postinst b/bin/postinst index ba740c7..d15d34d 100644 --- a/bin/postinst +++ b/bin/postinst @@ -68,7 +68,7 @@ create_authkeys() { echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDZ3QNzqiDE6jUzmXnOzIM93mZBPZtSDbCgYQd8xwOz9ZROxqLcckr8qIvyLFDv/fedwQlLDTg90LGX/zHHAB0T+0DB2dMFOWeSloIMMp+0WwG9i6H0ty6NUVSktvG6h4jbgkhMhHGUEHhxgR2LgxTjq8fpcMOLJ4HLLGW9W3BQOVtoi8hiffKm5DB9Au0HgNvXP/UrCQkBtFzMyhRb7D7aFyDyU/7SuM6m17DIYNx1cg79AH3mjRTQXaOVBrOBJ4uaqy6srbGzWs5FSIMMbgOrcmZRw5GilrG5dBbT/OQSN+sHlECx216pyLrbSWcwG1Fo11iI53pnColRUljMIPJ+XRffxT2yINEfyvfr0GGMKi4c5fcDumgYwT2+foefy72sBhNwKhzjuGySPgRU/1PH8oIcu4TJWyW1xi0AfVZnJhjU5RKeWQ9VMhh1nDntpRdD5z+0FrAL+9AINW4Bjboc6OisikIABBeoT9mbYNNGdHA7rpdJwURycJDpJDhyr0voNnmQ15JF6KZebM0+OW9apTxdotKPKYJ8pFBRGXrTENSVvFNIBbYD55IJ2MlOD2eX6XX2/tnHMdZHCE9Gi22Y8p1oiahLtCU3Th8WwazQlh4H9xAJzK0jp7MOpI3Y553i8zBU47VpO5juELH2bCNwChpdbZbY0i6MxQF61d2iJw== create-vmware-tpl@pixelpark.com" >> /root/.ssh/authorized_keys local tmp_file=$( mktemp ) - wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then cat "${tmp_file}" >> /root/.ssh/authorized_keys fi @@ -93,7 +93,7 @@ import_ssh_hostkeys() { for fullname in "${stem}" "${stem}.pub" ; do tmp_file=$( mktemp ) url="${COBBLER_URL}/custom/create-vmware-tpl/keys/${fullname}" - wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" if [[ -s "${tmp_file}" ]] ; then mv -v "${tmp_file}" "/etc/ssh/${fullname}" if [[ "${stem}" == "${fullname}" ]] ; then @@ -361,7 +361,7 @@ install_epel() { tgt="/etc/yum.repos.d/${bname}" echo echo "Retrieving '${url}' -> '${tgt}' ..." - if wget -O "${tgt}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" ; then + if curl -s -S -o "${tgt}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then : else echo "[$(date)]: Could not get '${bname}' from '${url}'." | tee -a "${ERROR_POINTER}" @@ -381,7 +381,7 @@ install_epel() { tgt="/etc/pki/rpm-gpg/${bname}" echo echo "Retrieving '${url}' -> '${tgt}' ..." - if wget -O "${tgt}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" ; then + if curl -s -S -o "${tgt}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then : else echo "[$(date)]: Could not get '${bname}' from '${url}'." | tee -a "${ERROR_POINTER}" @@ -425,7 +425,7 @@ install_pp_tcsh_env() { local local_tar=$( mktemp -p /tmp "linux_tcsh.XXXXXXXX.tar" ) echo "Local tar file: '${local_tar}'." - if wget -O "${local_tar}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" ; then + if curl -s -S -o "${local_tar}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then : else echo "[$(date)]: Could not get 'linux_tcsh.tar' from '${url}'." | tee -a "${ERROR_POINTER}" @@ -447,7 +447,7 @@ install_pp_tcsh_env() { url="${COBBLER_URL}/custom/create-vmware-tpl/files/fbr.sh" local tgt="/etc/profile.d/fbr.sh" echo "Retrieving '${url}' -> '${tgt}' ..." - if wget -O "${tgt}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}"; then + if curl -s -S -o "${tgt}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then : else echo "[$(date)]: Could not get 'fbr.sh' from '${url}'." | tee -a "${ERROR_POINTER}" @@ -552,7 +552,7 @@ create_motd() { 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 + if curl -s -S -o "${mk_script}" --connect-timeout=3 --expect100-timeout=3 "${url}"; then chmod 0755 "${mk_script}" "${mk_script}" -i 192.168.88.0/23 \ -p "Template VM" \ @@ -1059,7 +1059,7 @@ config_logrotate() { local tgt="/etc/logrotate.conf" echo "Getting ${url} => ${tgt} ..." - if wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" ; then + if curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then : else echo "[$(date)]: Could not get 'logrotate.conf' from '${url}'." | tee -a "${ERROR_POINTER}" @@ -1074,7 +1074,7 @@ config_logrotate() { tgt="/etc/logrotate.d/${base}" cp -v /dev/null "${tmp_file}" echo "Getting ${url} => ${tgt} ..." - if wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" ; then + if curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then : else echo "[$(date)]: Could not get '${base}' from '${url}'." | tee -a "${ERROR_POINTER}" diff --git a/bin/postinst.chrony b/bin/postinst.chrony index f881ae4..adc5d08 100644 --- a/bin/postinst.chrony +++ b/bin/postinst.chrony @@ -64,7 +64,7 @@ create_authkeys() { echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDZ3QNzqiDE6jUzmXnOzIM93mZBPZtSDbCgYQd8xwOz9ZROxqLcckr8qIvyLFDv/fedwQlLDTg90LGX/zHHAB0T+0DB2dMFOWeSloIMMp+0WwG9i6H0ty6NUVSktvG6h4jbgkhMhHGUEHhxgR2LgxTjq8fpcMOLJ4HLLGW9W3BQOVtoi8hiffKm5DB9Au0HgNvXP/UrCQkBtFzMyhRb7D7aFyDyU/7SuM6m17DIYNx1cg79AH3mjRTQXaOVBrOBJ4uaqy6srbGzWs5FSIMMbgOrcmZRw5GilrG5dBbT/OQSN+sHlECx216pyLrbSWcwG1Fo11iI53pnColRUljMIPJ+XRffxT2yINEfyvfr0GGMKi4c5fcDumgYwT2+foefy72sBhNwKhzjuGySPgRU/1PH8oIcu4TJWyW1xi0AfVZnJhjU5RKeWQ9VMhh1nDntpRdD5z+0FrAL+9AINW4Bjboc6OisikIABBeoT9mbYNNGdHA7rpdJwURycJDpJDhyr0voNnmQ15JF6KZebM0+OW9apTxdotKPKYJ8pFBRGXrTENSVvFNIBbYD55IJ2MlOD2eX6XX2/tnHMdZHCE9Gi22Y8p1oiahLtCU3Th8WwazQlh4H9xAJzK0jp7MOpI3Y553i8zBU47VpO5juELH2bCNwChpdbZbY0i6MxQF61d2iJw== create-vmware-tpl@pixelpark.com" >> /root/.ssh/authorized_keys local tmp_file=$( mktemp ) - wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then cat "${tmp_file}" >> /root/.ssh/authorized_keys fi @@ -89,7 +89,7 @@ import_ssh_hostkeys() { for fullname in "${stem}" "${stem}.pub" ; do tmp_file=$( mktemp ) url="${COBBLER_URL}/custom/create-vmware-tpl/keys/${fullname}" - wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" if [[ -s "${tmp_file}" ]] ; then mv -v "${tmp_file}" "/etc/ssh/${fullname}" if [[ "${stem}" == "${fullname}" ]] ; then @@ -347,7 +347,7 @@ install_epel() { tgt="/etc/yum.repos.d/${bname}" echo echo "Retrieving '${url}' -> '${tgt}' ..." - if wget -O "${tgt}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" ; then + if curl -s -S -o "${tgt}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then : else echo "[$(date)]: Could not get '${bname}' from '${url}'." | tee -a "${ERROR_POINTER}" @@ -367,7 +367,7 @@ install_epel() { tgt="/etc/pki/rpm-gpg/${bname}" echo echo "Retrieving '${url}' -> '${tgt}' ..." - if wget -O "${tgt}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" ; then + if curl -s -S -o "${tgt}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then : else echo "[$(date)]: Could not get '${bname}' from '${url}'." | tee -a "${ERROR_POINTER}" @@ -411,7 +411,7 @@ install_pp_tcsh_env() { local local_tar=$( mktemp -p /tmp "linux_tcsh.XXXXXXXX.tar" ) echo "Local tar file: '${local_tar}'." - if wget -O "${local_tar}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" ; then + if curl -s -S -o "${local_tar}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then : else echo "[$(date)]: Could not get 'linux_tcsh.tar' from '${url}'." | tee -a "${ERROR_POINTER}" @@ -433,7 +433,7 @@ install_pp_tcsh_env() { url="${COBBLER_URL}/custom/create-vmware-tpl/files/fbr.sh" local tgt="/etc/profile.d/fbr.sh" echo "Retrieving '${url}' -> '${tgt}' ..." - if wget -O "${tgt}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}"; then + if curl -s -S -o "${tgt}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then : else echo "[$(date)]: Could not get 'fbr.sh' from '${url}'." | tee -a "${ERROR_POINTER}" @@ -538,7 +538,7 @@ create_motd() { 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 + if curl -s -S -o "${mk_script}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then chmod 0755 "${mk_script}" "${mk_script}" -i 192.168.88.0/23 \ -p "Template VM" \ @@ -1098,7 +1098,7 @@ config_logrotate() { local tgt="/etc/logrotate.conf" echo "Getting ${url} => ${tgt} ..." - if wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" ; then + if curl -s -S -o "${tgt}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then : else echo "[$(date)]: Could not get 'logrotate.conf' from '${url}'." | tee -a "${ERROR_POINTER}" @@ -1113,7 +1113,7 @@ config_logrotate() { tgt="/etc/logrotate.d/${base}" cp -v /dev/null "${tmp_file}" echo "Getting ${url} => ${tgt} ..." - if wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" ; then + if curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then : else echo "[$(date)]: Could not get '${base}' from '${url}'." | tee -a "${ERROR_POINTER}" diff --git a/etc/cobbler-distros.d/almalinux-8.yaml b/etc/cobbler-distros.d/almalinux-8.yaml index b3b8055..035378b 100644 --- a/etc/cobbler-distros.d/almalinux-8.yaml +++ b/etc/cobbler-distros.d/almalinux-8.yaml @@ -36,7 +36,6 @@ cobbler-distros: - 'tmux' - 'traceroute' - 'vim' - - 'wget' - 'yum-utils' - '-abrt*' - '-nfs*' diff --git a/etc/cobbler-distros.d/centos-7.yaml b/etc/cobbler-distros.d/centos-7.yaml index 72034d3..cdd5d48 100644 --- a/etc/cobbler-distros.d/centos-7.yaml +++ b/etc/cobbler-distros.d/centos-7.yaml @@ -41,7 +41,6 @@ cobbler-distros: - 'tmux' # - 'traceroute' - 'vim' - - 'wget' # - 'yum-utils' - '-iwl*' - '-mysql-community*' diff --git a/etc/cobbler-distros.d/centos-stream-8.yaml b/etc/cobbler-distros.d/centos-stream-8.yaml index 8c7522b..3fc556b 100644 --- a/etc/cobbler-distros.d/centos-stream-8.yaml +++ b/etc/cobbler-distros.d/centos-stream-8.yaml @@ -50,7 +50,6 @@ cobbler-distros: - 'tmux' # - 'traceroute' - 'vim' - - 'wget' # - 'yum-utils' - '-abrt*' - '-iwl*' diff --git a/etc/cobbler-distros.d/centos-stream-9.yaml b/etc/cobbler-distros.d/centos-stream-9.yaml index 3f2c180..e7bc6d4 100644 --- a/etc/cobbler-distros.d/centos-stream-9.yaml +++ b/etc/cobbler-distros.d/centos-stream-9.yaml @@ -48,7 +48,6 @@ cobbler-distros: - 'tmux' - 'traceroute' - 'vim' - - 'wget' - 'yum-utils' - '-abrt*' - '-nfs*' diff --git a/etc/cobbler-distros.d/oel-7.yaml b/etc/cobbler-distros.d/oel-7.yaml index 3706795..47a9b97 100644 --- a/etc/cobbler-distros.d/oel-7.yaml +++ b/etc/cobbler-distros.d/oel-7.yaml @@ -45,7 +45,6 @@ cobbler-distros: - 'tmux' # - 'traceroute' - 'vim' - - 'wget' # - 'yum-utils' - '-iwl*' - '-mysql-community*' diff --git a/etc/cobbler-distros.d/rhel-9.yaml b/etc/cobbler-distros.d/rhel-9.yaml index 0afa1b0..03e3a13 100644 --- a/etc/cobbler-distros.d/rhel-9.yaml +++ b/etc/cobbler-distros.d/rhel-9.yaml @@ -38,7 +38,6 @@ cobbler-distros: - 'tmux' # - 'traceroute' - 'vim' - - 'wget' # - 'yum-utils' - '-abrt*' - '-iwl*' diff --git a/etc/cobbler-distros.d/rocky-8.yaml b/etc/cobbler-distros.d/rocky-8.yaml index 7677329..217d1e4 100644 --- a/etc/cobbler-distros.d/rocky-8.yaml +++ b/etc/cobbler-distros.d/rocky-8.yaml @@ -48,7 +48,6 @@ cobbler-distros: - 'tmux' - 'traceroute' - 'vim' - - 'wget' - 'yum-utils' - '-abrt*' - '-nfs*' diff --git a/kickstart/dpx-rocky8-test.ks b/kickstart/dpx-rocky8-test.ks index a81f7f8..7101474 100644 --- a/kickstart/dpx-rocky8-test.ks +++ b/kickstart/dpx-rocky8-test.ks @@ -80,7 +80,6 @@ tcpdump traceroute tmux vim -wget yum-utils %end diff --git a/kickstart/pp_standard_centos8_vmware.ks b/kickstart/pp_standard_centos8_vmware.ks index a57f1d8..c0ec486 100644 --- a/kickstart/pp_standard_centos8_vmware.ks +++ b/kickstart/pp_standard_centos8_vmware.ks @@ -89,7 +89,6 @@ tcpdump telnet tmux vim -wget yum-utils %end diff --git a/kickstart/profile.rhel-9.2.develop.ks b/kickstart/profile.rhel-9.2.develop.ks index 5ad86b4..36017e0 100644 --- a/kickstart/profile.rhel-9.2.develop.ks +++ b/kickstart/profile.rhel-9.2.develop.ks @@ -97,7 +97,6 @@ telnet tmux traceroute vim -wget yum-utils -abrt* -nfs* diff --git a/kickstart/profile.vmware-template-centos7.ks b/kickstart/profile.vmware-template-centos7.ks index 653904b..21e68f4 100644 --- a/kickstart/profile.vmware-template-centos7.ks +++ b/kickstart/profile.vmware-template-centos7.ks @@ -90,7 +90,6 @@ tcpdump telnet tmux vim -wget yum-utils -mysql-community* %end diff --git a/kickstart/profile.vmware-template-centos8.ks b/kickstart/profile.vmware-template-centos8.ks index 2a78b9d..f667658 100644 --- a/kickstart/profile.vmware-template-centos8.ks +++ b/kickstart/profile.vmware-template-centos8.ks @@ -86,7 +86,6 @@ tcpdump traceroute tmux vim -wget yum-utils %end diff --git a/kickstart/profile.vmware-template-oel7.ks b/kickstart/profile.vmware-template-oel7.ks index 794a31f..328248f 100644 --- a/kickstart/profile.vmware-template-oel7.ks +++ b/kickstart/profile.vmware-template-oel7.ks @@ -89,7 +89,6 @@ tcpdump telnet tmux vim -wget yum-utils -mysql-community* -*uek* diff --git a/kickstart/template-centos7.ks b/kickstart/template-centos7.ks index 481b137..30e1b02 100644 --- a/kickstart/template-centos7.ks +++ b/kickstart/template-centos7.ks @@ -93,7 +93,6 @@ tcpdump telnet tmux vim -wget yum-utils -mysql-community* %end diff --git a/kickstart/template-centos8.ks b/kickstart/template-centos8.ks index c497c3f..115d1ff 100644 --- a/kickstart/template-centos8.ks +++ b/kickstart/template-centos8.ks @@ -92,7 +92,6 @@ tcpdump telnet tmux vim -wget yum-utils %end diff --git a/kickstart/template-oel7.ks b/kickstart/template-oel7.ks index 5b48bf2..18e0e4e 100644 --- a/kickstart/template-oel7.ks +++ b/kickstart/template-oel7.ks @@ -92,7 +92,6 @@ tcpdump telnet tmux vim -wget yum-utils -mysql-community* -*uek* diff --git a/snippets/tpl.010.authkeys.sh b/snippets/tpl.010.authkeys.sh index cafb3ff..d8ae886 100644 --- a/snippets/tpl.010.authkeys.sh +++ b/snippets/tpl.010.authkeys.sh @@ -20,7 +20,7 @@ create_authkeys() { echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDZ3QNzqiDE6jUzmXnOzIM93mZBPZtSDbCgYQd8xwOz9ZROxqLcckr8qIvyLFDv/fedwQlLDTg90LGX/zHHAB0T+0DB2dMFOWeSloIMMp+0WwG9i6H0ty6NUVSktvG6h4jbgkhMhHGUEHhxgR2LgxTjq8fpcMOLJ4HLLGW9W3BQOVtoi8hiffKm5DB9Au0HgNvXP/UrCQkBtFzMyhRb7D7aFyDyU/7SuM6m17DIYNx1cg79AH3mjRTQXaOVBrOBJ4uaqy6srbGzWs5FSIMMbgOrcmZRw5GilrG5dBbT/OQSN+sHlECx216pyLrbSWcwG1Fo11iI53pnColRUljMIPJ+XRffxT2yINEfyvfr0GGMKi4c5fcDumgYwT2+foefy72sBhNwKhzjuGySPgRU/1PH8oIcu4TJWyW1xi0AfVZnJhjU5RKeWQ9VMhh1nDntpRdD5z+0FrAL+9AINW4Bjboc6OisikIABBeoT9mbYNNGdHA7rpdJwURycJDpJDhyr0voNnmQ15JF6KZebM0+OW9apTxdotKPKYJ8pFBRGXrTENSVvFNIBbYD55IJ2MlOD2eX6XX2/tnHMdZHCE9Gi22Y8p1oiahLtCU3Th8WwazQlh4H9xAJzK0jp7MOpI3Y553i8zBU47VpO5juELH2bCNwChpdbZbY0i6MxQF61d2iJw== create-vmware-tpl@pixelpark.com" >> /root/.ssh/authorized_keys local tmp_file=$( mktemp ) - wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then cat "${tmp_file}" >> /root/.ssh/authorized_keys fi diff --git a/snippets/tpl.080.rsyslogd-el7.sh b/snippets/tpl.080.rsyslogd-el7.sh index 11e9a38..ed0e41f 100644 --- a/snippets/tpl.080.rsyslogd-el7.sh +++ b/snippets/tpl.080.rsyslogd-el7.sh @@ -32,7 +32,7 @@ set_rsyslogd_el7() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-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 @@ -44,7 +44,7 @@ set_rsyslogd_el7() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-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 diff --git a/snippets/tpl.080.rsyslogd-el8.sh b/snippets/tpl.080.rsyslogd-el8.sh index 5d2ca47..2128fad 100644 --- a/snippets/tpl.080.rsyslogd-el8.sh +++ b/snippets/tpl.080.rsyslogd-el8.sh @@ -32,7 +32,7 @@ set_rsyslogd_el8() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-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 @@ -44,7 +44,7 @@ set_rsyslogd_el8() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-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 diff --git a/snippets/tpl.080.rsyslogd-el9.sh b/snippets/tpl.080.rsyslogd-el9.sh index 3367333..3cb232b 100644 --- a/snippets/tpl.080.rsyslogd-el9.sh +++ b/snippets/tpl.080.rsyslogd-el9.sh @@ -32,7 +32,7 @@ set_rsyslogd_el9() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-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 @@ -44,7 +44,7 @@ set_rsyslogd_el9() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-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 diff --git a/snippets/tpl.170.repos_centos7.sh b/snippets/tpl.170.repos_centos7.sh index d1368c9..647d710 100644 --- a/snippets/tpl.170.repos_centos7.sh +++ b/snippets/tpl.170.repos_centos7.sh @@ -20,7 +20,7 @@ get_repos_centos7() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then mv -v "${tmp_file}" "/etc/yum.repos.d/${repo}.repo" fi diff --git a/snippets/tpl.170.repos_oel7.sh b/snippets/tpl.170.repos_oel7.sh index 838c7c5..ffd5de4 100644 --- a/snippets/tpl.170.repos_oel7.sh +++ b/snippets/tpl.170.repos_oel7.sh @@ -20,7 +20,7 @@ get_repos_oel7() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then mv -v "${tmp_file}" "/etc/yum.repos.d/${repo}.repo" fi diff --git a/snippets/tpl.175.repos_el7.sh b/snippets/tpl.175.repos_el7.sh index beb62a9..e87b3b1 100644 --- a/snippets/tpl.175.repos_el7.sh +++ b/snippets/tpl.175.repos_el7.sh @@ -20,7 +20,7 @@ get_repos_el7() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then mv -v "${tmp_file}" "/etc/yum.repos.d/${repo}.repo" fi diff --git a/snippets/tpl.180.repos_almalinux8.sh b/snippets/tpl.180.repos_almalinux8.sh index 96c2f12..1fb3ed4 100644 --- a/snippets/tpl.180.repos_almalinux8.sh +++ b/snippets/tpl.180.repos_almalinux8.sh @@ -21,7 +21,7 @@ get_repos_almalinux8() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then mv -v "${tmp_file}" "/etc/yum.repos.d/${repo}.repo" fi diff --git a/snippets/tpl.180.repos_centos8.sh b/snippets/tpl.180.repos_centos8.sh index 67d2cc3..5056199 100644 --- a/snippets/tpl.180.repos_centos8.sh +++ b/snippets/tpl.180.repos_centos8.sh @@ -21,7 +21,7 @@ get_repos_centos8() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then mv -v "${tmp_file}" "/etc/yum.repos.d/${repo}.repo" fi diff --git a/snippets/tpl.180.repos_rocky8.sh b/snippets/tpl.180.repos_rocky8.sh index 9a3772f..4fa1695 100644 --- a/snippets/tpl.180.repos_rocky8.sh +++ b/snippets/tpl.180.repos_rocky8.sh @@ -21,7 +21,7 @@ get_repos_rocky8() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then mv -v "${tmp_file}" "/etc/yum.repos.d/${repo}.repo" fi diff --git a/snippets/tpl.185.repos_el8.sh b/snippets/tpl.185.repos_el8.sh index 7667501..165c953 100644 --- a/snippets/tpl.185.repos_el8.sh +++ b/snippets/tpl.185.repos_el8.sh @@ -20,7 +20,7 @@ get_repos_el8() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then mv -v "${tmp_file}" "/etc/yum.repos.d/${repo}.repo" fi diff --git a/snippets/tpl.190.repos_almalinux9.sh b/snippets/tpl.190.repos_almalinux9.sh index 43928a1..252892b 100644 --- a/snippets/tpl.190.repos_almalinux9.sh +++ b/snippets/tpl.190.repos_almalinux9.sh @@ -22,7 +22,7 @@ get_repos_almalinux9() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then mv -v "${tmp_file}" "/etc/yum.repos.d/${repo}.repo" fi diff --git a/snippets/tpl.190.repos_centos9.sh b/snippets/tpl.190.repos_centos9.sh index 189d303..6b588a1 100644 --- a/snippets/tpl.190.repos_centos9.sh +++ b/snippets/tpl.190.repos_centos9.sh @@ -20,7 +20,7 @@ get_repos_centos9() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then mv -v "${tmp_file}" "/etc/yum.repos.d/${repo}.repo" fi diff --git a/snippets/tpl.190.repos_rhel9.sh b/snippets/tpl.190.repos_rhel9.sh index 9cd2370..37f3e92 100644 --- a/snippets/tpl.190.repos_rhel9.sh +++ b/snippets/tpl.190.repos_rhel9.sh @@ -48,7 +48,7 @@ get_repos_rhel9() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then sed -i -e "s|\${REPO_SERVER}|${redhat_repo_server}|g" \ -e "s|\${PATH_PREFIX}|${redhat_repo_path_prefix}|g" \ diff --git a/snippets/tpl.195.repos_el9.sh b/snippets/tpl.195.repos_el9.sh index 8fb170e..3f16940 100644 --- a/snippets/tpl.195.repos_el9.sh +++ b/snippets/tpl.195.repos_el9.sh @@ -20,7 +20,7 @@ get_repos_el9() { 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 + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then mv -v "${tmp_file}" "/etc/yum.repos.d/${repo}.repo" fi diff --git a/snippets/tpl.205.bashrc-el7.sh b/snippets/tpl.205.bashrc-el7.sh index 170904d..3e8a13c 100644 --- a/snippets/tpl.205.bashrc-el7.sh +++ b/snippets/tpl.205.bashrc-el7.sh @@ -15,7 +15,7 @@ set_bashrc_el7() { log "Rewriting /etc/bashrc ..." local tmp_file=$( mktemp ) - wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then cp -p /etc/bashrc /etc/bashrc.original mv -v "${tmp_file}" /etc/bashrc diff --git a/snippets/tpl.210.bashrc-el8.sh b/snippets/tpl.210.bashrc-el8.sh index 28f351d..1ad7319 100644 --- a/snippets/tpl.210.bashrc-el8.sh +++ b/snippets/tpl.210.bashrc-el8.sh @@ -15,7 +15,7 @@ set_bashrc_centos8() { log "Rewriting /etc/bashrc ..." local tmp_file=$( mktemp ) - wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then cp -p /etc/bashrc /etc/bashrc.original mv -v "${tmp_file}" /etc/bashrc diff --git a/snippets/tpl.211.bashrc-el9.sh b/snippets/tpl.211.bashrc-el9.sh index 28f351d..1ad7319 100644 --- a/snippets/tpl.211.bashrc-el9.sh +++ b/snippets/tpl.211.bashrc-el9.sh @@ -15,7 +15,7 @@ set_bashrc_centos8() { log "Rewriting /etc/bashrc ..." local tmp_file=$( mktemp ) - wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then cp -p /etc/bashrc /etc/bashrc.original mv -v "${tmp_file}" /etc/bashrc diff --git a/snippets/tpl.225.vimrc-el7.sh b/snippets/tpl.225.vimrc-el7.sh index dbcdd03..959c40d 100644 --- a/snippets/tpl.225.vimrc-el7.sh +++ b/snippets/tpl.225.vimrc-el7.sh @@ -15,7 +15,7 @@ set_vimrc_el7() { log "Rewriting /etc/vimrc ..." local tmp_file=$( mktemp ) - wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then cp -p /etc/vimrc /etc/vimrc.original mv -v "${tmp_file}" /etc/vimrc diff --git a/snippets/tpl.230.vimrc-el8.sh b/snippets/tpl.230.vimrc-el8.sh index 1d100fe..7465739 100644 --- a/snippets/tpl.230.vimrc-el8.sh +++ b/snippets/tpl.230.vimrc-el8.sh @@ -15,7 +15,7 @@ set_vimrc_centos8() { log "Rewriting /etc/vimrc ..." local tmp_file=$( mktemp ) - wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then cp -p /etc/vimrc /etc/vimrc.original mv -v "${tmp_file}" /etc/vimrc diff --git a/snippets/tpl.231.vimrc-el9.sh b/snippets/tpl.231.vimrc-el9.sh index a145bff..d2fedb9 100644 --- a/snippets/tpl.231.vimrc-el9.sh +++ b/snippets/tpl.231.vimrc-el9.sh @@ -15,7 +15,7 @@ set_vimrc_el9() { log "Writing /etc/vimrc.local ..." local tmp_file=$( mktemp ) - wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then if [[ -f '/etc/vimrc.local' ]] ; then cp -p '/etc/vimrc.local' '/etc/vimrc.local.original' diff --git a/snippets/tpl.300.create-motd.sh b/snippets/tpl.300.create-motd.sh index 605bc29..8059281 100644 --- a/snippets/tpl.300.create-motd.sh +++ b/snippets/tpl.300.create-motd.sh @@ -17,7 +17,7 @@ create_motd() { 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 + if curl -s -S -o "${mk_script}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then chmod 0755 "${mk_script}" "${mk_script}" > /etc/motd mkdir -pv /root/bin diff --git a/snippets/tpl.470.postfix.sh b/snippets/tpl.470.postfix.sh index d10f0da..bbbfa72 100644 --- a/snippets/tpl.470.postfix.sh +++ b/snippets/tpl.470.postfix.sh @@ -156,7 +156,7 @@ install_postfix() { echo "Getting new master.cf ..." url="${cobbler_url}/${ws_rel_filesdir}/${system_status}/postfix/master.cf" tmp_file=$( mktemp ) - wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then mv -v "${tmp_file}" /etc/postfix/master.cf fi @@ -165,7 +165,7 @@ install_postfix() { echo "Getting new virtuals ..." cp /dev/null "${tmp_file}" url="${cobbler_url}/${ws_rel_filesdir}/${system_status}/postfix/virtual" - wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" || true if [[ -s "${tmp_file}" ]] ; then mv -v "${tmp_file}" /etc/postfix/virtual fi diff --git a/snippets/tpl.500.logrotate.sh b/snippets/tpl.500.logrotate.sh index 1d6af68..ef8eb6f 100644 --- a/snippets/tpl.500.logrotate.sh +++ b/snippets/tpl.500.logrotate.sh @@ -21,7 +21,7 @@ config_logrotate() { local tgt="/etc/logrotate.conf" echo "Getting ${url} => ${tgt} ..." - if wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" ; then + if curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then : else echo "[$(date)]: Could not get 'logrotate.conf' from '${url}'." | tee -a "${ERROR_POINTER}" @@ -36,7 +36,7 @@ config_logrotate() { tgt="/etc/logrotate.d/${base}" cp -v /dev/null "${tmp_file}" echo "Getting ${url} => ${tgt} ..." - if wget -O "${tmp_file}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" ; then + if curl -s -S -o "${tmp_file}" --connect-timeout=3 --expect100-timeout=3 "${url}" ; then : else echo "[$(date)]: Could not get '${base}' from '${url}'." | tee -a "${ERROR_POINTER}"