2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-09-28 13:08:32 +00:00

Leave cfgloc.orig around

If a cluster has a non-master db server, give
them a hook to restore the correct cfgloc if desired.
This commit is contained in:
Jarrod Johnson
2018-02-27 09:41:57 -05:00
parent e372fb5b73
commit 10090a9dc8

View File

@@ -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