From 388b9e362df471ce2a06a87b093f348a35b29de1 Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 29 Nov 2010 19:06:56 +0000 Subject: [PATCH] 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 --- xCAT/postscripts/db2install | 41 ++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) 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; + + } ##################################################### #