make sure nfs is running before mounting the install directory

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8280 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2010-11-29 19:06:56 +00:00
parent 32672091d8
commit 388b9e362d

View File

@ -96,7 +96,9 @@ if (!(-e ($db2install)))
chomp $::db2installloc;
$::db2installloc =~
s/^(\'|\")(.*)(\"|\')$/$2/; # remove any surrounding quotes
# startNFS
$rc = &startNFS;
# mount the db2 directory to get to the db2 code to install
$rc = &mountdb2code;
@ -241,6 +243,43 @@ sub getcfgloc
}
return 0;
}
#####################################################
#
# startNFS
# Makes sure NFS is running
#
#####################################################
sub startNFS
{
my $rc = 0;
if (xCAT::Utils->isLinux())
{
my $os = xCAT::Utils->osver();
if ($os =~ /sles.*/)
{
$rc = xCAT::Utils->startService("nfs");
$rc = xCAT::Utils->startService("nfsserver");
}
else
{
$rc = xCAT::Utils->startService("nfs");
}
}
else
{ #AIX
$rc = xCAT::Utils->startService("nfsd");
}
if ($rc != 0)
{
return 1;
}
return $rc;
}
#####################################################
#