From: Frank Brehm Date: Wed, 8 Nov 2023 15:12:34 +0000 (+0100) Subject: Fixing calling curl X-Git-Tag: 3.2.1~21 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=da7d00cff9e91d5e5c3a50501b6c6a85db0e673b;p=pixelpark%2Fcreate-vmware-tpl.git Fixing calling curl --- diff --git a/bin/postinst b/bin/postinst index bd41221..a927c78 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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}" - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" + curl -s -S -o "${tmp_file}" --connect-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 curl -s -S -o "${tgt}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${tgt}" --connect-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 curl -s -S -o "${tgt}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${tgt}" --connect-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 curl -s -S -o "${local_tar}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${local_tar}" --connect-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 curl -s -S -o "${tgt}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${tgt}" --connect-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 curl -s -S -o "${mk_script}" --connect-timeout 3 --expect100-timeout 3 "${url}"; then + if curl -s -S -o "${mk_script}" --connect-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 curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${tmp_file}" --connect-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 curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${tmp_file}" --connect-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 caa6613..21e6185 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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}" - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" + curl -s -S -o "${tmp_file}" --connect-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 curl -s -S -o "${tgt}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${tgt}" --connect-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 curl -s -S -o "${tgt}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${tgt}" --connect-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 curl -s -S -o "${local_tar}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${local_tar}" --connect-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 curl -s -S -o "${tgt}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${tgt}" --connect-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 curl -s -S -o "${mk_script}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${mk_script}" --connect-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 curl -s -S -o "${tgt}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${tgt}" --connect-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 curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${tmp_file}" --connect-timeout 3 "${url}" ; then : else echo "[$(date)]: Could not get '${base}' from '${url}'." | tee -a "${ERROR_POINTER}" diff --git a/snippets/tpl.010.authkeys.sh b/snippets/tpl.010.authkeys.sh index 58c7cce..add340a 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 d95fb9f..9e062c8 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url_top}" || true + curl -s -S -o "${tmp_file}" --connect-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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url_sub}" || true + curl -s -S -o "${tmp_file}" --connect-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 ba193bb..bec93a3 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url_top}" || true + curl -s -S -o "${tmp_file}" --connect-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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url_sub}" || true + curl -s -S -o "${tmp_file}" --connect-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 69689b9..9d6369d 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url_top}" || true + curl -s -S -o "${tmp_file}" --connect-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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url_sub}" || true + curl -s -S -o "${tmp_file}" --connect-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 85c7f95..76313d1 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 02cff86..61abde3 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 07c5d11..5a86196 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 2db07d8..ccb7532 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 101a171..6c57ac6 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 a0e9c6d..949f19c 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 96bb0c5..37f462f 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 97f2720..5be5639 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 4e329a6..d2fe257 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 20347cb..c11e813 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 8e654ad..29c0797 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 c778539..1d25a29 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 7338aac..1029e36 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 7338aac..1029e36 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 8f5d0c1..d00b1fb 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 7fcdf53..322580e 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 e5ea9f1..aecd383 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 a128dd1..bc51cd5 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 curl -s -S -o "${mk_script}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${mk_script}" --connect-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 1395692..ad61542 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 ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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" - curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" || true + curl -s -S -o "${tmp_file}" --connect-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 1946da9..03f446a 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 curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${tmp_file}" --connect-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 curl -s -S -o "${tmp_file}" --connect-timeout 3 --expect100-timeout 3 "${url}" ; then + if curl -s -S -o "${tmp_file}" --connect-timeout 3 "${url}" ; then : else echo "[$(date)]: Could not get '${base}' from '${url}'." | tee -a "${ERROR_POINTER}"