From 10090a9dc8f8cb03cd4f96dbc48237191a350b1d Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 27 Feb 2018 09:41:57 -0500 Subject: [PATCH] Leave cfgloc.orig around If a cluster has a non-master db server, give them a hook to restore the correct cfgloc if desired. --- xCAT/postscripts/xcatserver | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/xcatserver b/xCAT/postscripts/xcatserver index 225d744e8..d4ba3909c 100755 --- a/xCAT/postscripts/xcatserver +++ b/xCAT/postscripts/xcatserver @@ -164,8 +164,8 @@ if [ $? -ne 0 ]; then # if not DB2 grep "DB2" /etc/xcat/cfgloc 2>&1 1> /dev/null if [ $? -ne 0 ]; then - sed s/host=[^\|]*/host=$MASTER/ /etc/xcat/cfgloc > /etc/xcat/cfgloc.new - mv /etc/xcat/cfgloc.new /etc/xcat/cfgloc + mv /etc/xcat/cfgloc /etc/xcat/cfgloc.orig + sed s/host=[^\|]*/host=$MASTER/ /etc/xcat/cfgloc.orig > /etc/xcat/cfgloc else # DB2 cfgloc has different format if [ -n "$UPDATENODE" ] && [ $UPDATENODE -eq 1 ]; then cp /etc/xcat/cfgloc /etc/xcat/cfgloc.db2