[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master eabf3eb7 4/4: Alter '.wgetrc' only for a corp
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master eabf3eb7 4/4: Alter '.wgetrc' only for a corporate redhat server |
Date: |
Sun, 22 Jan 2023 12:39:53 -0500 (EST) |
branch: master
commit eabf3eb7a00833da0d37ce687a544a6b7d347bf6
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Alter '.wgetrc' only for a corporate redhat server
The corporate server either lacks or mishandles certificates, so it's
expedient to turn off validation there. Despite its name, though, this
script may be used on a personal debian workstation, where this sloppy
expedient is to be avoided.
---
gwc/redhat_rebuild.sh | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/gwc/redhat_rebuild.sh b/gwc/redhat_rebuild.sh
index b8f957bc..a08d448e 100755
--- a/gwc/redhat_rebuild.sh
+++ b/gwc/redhat_rebuild.sh
@@ -6,8 +6,14 @@ set -evx
# maintained outside any chroot is up to date--i.e., that all changes
# committed in any earlier chroot have been pushed.
- echo 'check_certificate = off' >> ~/.wgetrc
-sudo sh -c "echo 'check_certificate = off' >> ~/.wgetrc"
+case "$(cat /proc/version)" in
+ (*"Red Hat"*)
+ echo 'check_certificate = off' >> ~/.wgetrc
+ sudo sh -c "echo 'check_certificate = off' >> ~/.wgetrc"
+ ;;
+ (*)
+ ;;
+esac
cd /srv/cache_for_lmi/logs || printf 'Cannot cd\n'
wget -N -nv https://git.savannah.nongnu.org/cgit/lmi.git/plain/lmi_setup_00.sh