update to reading xcat MN from xcatinfo file instead of using the exported $MASTER value, because it will be unreadable during diskfull reboot.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8347 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
f78f4f0b63
commit
434591e3b0
@ -13,7 +13,20 @@ my $passed = 0;
|
||||
# Set sleep time
|
||||
my $interval = 15;
|
||||
|
||||
my $master = "192.168.5.128";
|
||||
my $master;
|
||||
|
||||
# Get server IP from xcatinfo file
|
||||
if (-f "/etc/xcatinfo") {
|
||||
# if this file exists assume it has the correct server name
|
||||
my $cmd = "cat /etc/xcatinfo | grep 'XCATSERVER'";
|
||||
my $SNline = `$cmd`;
|
||||
my ($junk, $servnode) = split(/=/, $SNline);
|
||||
chomp $servnode;
|
||||
$servnode =~ s/^\s*//;
|
||||
if ($servnode) {
|
||||
$master = $servnode;
|
||||
}
|
||||
}
|
||||
|
||||
my $gpfsd = "hpcbootstatus gpfs-daemon=up";
|
||||
my $gpfsq = "hpcbootstatus gpfs-quorum=achieved";
|
||||
|
@ -16,6 +16,17 @@ ITEMNUM=6
|
||||
gpfsd="hpcbootstatus gpfs-daemon=up"
|
||||
gpfsq="hpcbootstatus gpfs-quorum=achieved"
|
||||
|
||||
# Get server IP from xcatinfo file
|
||||
if [ -f /opt/xcat/xcatinfo ]; then
|
||||
SIP=`cut -d= -f2 /opt/xcat/xcatinfo`
|
||||
if [ -n "$SIP" ]; then
|
||||
MASTER=$SIP
|
||||
fi
|
||||
else
|
||||
echo "xCAT management server IP can't be determined.\nexiting..."
|
||||
exit
|
||||
fi
|
||||
|
||||
# Use a loop
|
||||
while [ true ]; do
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user