diff --git a/xCAT/postscripts/db2install b/xCAT/postscripts/db2install index 0f0bad58f..4057592b3 100755 --- a/xCAT/postscripts/db2install +++ b/xCAT/postscripts/db2install @@ -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; + + } ##################################################### #