From d58f00ed5aeeed72c549c67fdb0e013c838ecb39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=E1=B4=8F=C9=B4=C9=A2=20Jie?= Date: Wed, 29 Aug 2018 17:25:32 +0800 Subject: [PATCH] Support RHEL7->RHEL8 diskful installation (#5491) * Make curl "fail" on >= 400 reponse codes with --fail * Minor fix of post.xcat.ng * Hack for RHEL8 Alpha - make network active by default --- xCAT-server/share/xcat/install/scripts/post.rhels8 | 3 +++ xCAT-server/share/xcat/install/scripts/post.xcat.ng | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.rhels8 b/xCAT-server/share/xcat/install/scripts/post.rhels8 index d875efbaa..cdc119e25 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rhels8 +++ b/xCAT-server/share/xcat/install/scripts/post.rhels8 @@ -18,3 +18,6 @@ do sed -i 's/ONBOOT=no/ONBOOT=yes/' "$i" fi done + +# Dirty hack for RHEL8 Alpha +chkconfig network on diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat.ng b/xCAT-server/share/xcat/install/scripts/post.xcat.ng index 83deac2fc..07c4e64bd 100644 --- a/xCAT-server/share/xcat/install/scripts/post.xcat.ng +++ b/xCAT-server/share/xcat/install/scripts/post.xcat.ng @@ -58,7 +58,7 @@ sleep "$RAND" if ! type openssl >/dev/null 2>&1 then msgutil_r "$MASTER_IP" "error" "/usr/bin/openssl does not exist, halt ..." "/var/log/xcat/xcat.log" "$log_label" - /tmp/updateflag $MASTER $XCATIPORT "installstatus failed" + /tmp/updateflag "$MASTER" "$XCATIPORT" "installstatus failed" sleep infinity fi @@ -119,11 +119,11 @@ function download_recursive() [ "$?" -ne "0" ] && return 1 ;; *) - curl --retry 20 --max-time 60 "${url}/${f}" -o "${dest_dir}/${f}" + curl --fail --retry 20 --max-time 60 "${url}/${f}" -o "${dest_dir}/${f}" [ "$?" -ne "0" ] && return 1 ;; esac - done < <(curl --retry 20 --max-time 60 "${url}/" | grep -o '\1' | cut -d '"' -f 2) + done < <(curl --fail --retry 20 --max-time 60 "${url}/" | grep -o '\1' | cut -d '"' -f 2) return 0 } @@ -143,7 +143,7 @@ export NODE="#TABLE:nodelist:THISNODE:node#" msgutil_r "$MASTER_IP" "info" "trying to get mypostscript from $MASTER_IP..." "/var/log/xcat/xcat.log" "$log_label" -curl --retry 20 --max-time 60 "http://$MASTER_IP$TFTPDIR/mypostscripts/mypostscript.$NODE" -o "/xcatpost/mypostscript.$NODE" 2> /tmp/download.log +curl --fail --retry 20 --max-time 60 "http://$MASTER_IP$TFTPDIR/mypostscripts/mypostscript.$NODE" -o "/xcatpost/mypostscript.$NODE" 2> /tmp/download.log if [ "$?" = "0" ] then case "$XCATDEBUGMODE" in