From 6fa06563ce5a06fd0837755a9b9b73c17bcb6fea Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 24 Oct 2011 11:25:16 +0000 Subject: [PATCH] nfsv4 support, add -o vers=4 to mount commands if site.useNFSv4onAIX is set git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10869 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/xcataixpost | 8 +++++++- xCAT/postscripts/xcataixscript | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/xcataixpost b/xCAT/postscripts/xcataixpost index 87ebbc05b..518529562 100755 --- a/xCAT/postscripts/xcataixpost +++ b/xCAT/postscripts/xcataixpost @@ -179,7 +179,13 @@ if ( !(-f "/xcatpost/xcataixpost") || $::opt_c ) { # get the contents of the /install/postscripts dir on the server # - mount dir from server and copy files - my $mcmd = "mkdir -p /xcatmnt; mount $servnode:$installdir/postscripts /xcatmnt"; + my $mcmd; + if ($ENV{'USENFSV4ONAIX'} && ($ENV{'USENFSV4ONAIX'} =~ /1|Yes|yes|YES|Y|y/)) + { + $mcmd = "mkdir -p /xcatmnt; mount -o vers=4 $servnode:$installdir/postscripts /xcatmnt"; + } else { + $mcmd = "mkdir -p /xcatmnt; mount $servnode:$installdir/postscripts /xcatmnt"; + } if (&runcmd($mcmd) != 0) { print "$::sdate xcataixpost: Could not mount $installdir/postscripts from $servnode.\n"; print $::LOG_FILE "$::sdate xcataixpost: Could not mount $installdir/postscripts from $servnode.\n"; diff --git a/xCAT/postscripts/xcataixscript b/xCAT/postscripts/xcataixscript index ce6a82268..be1c4f01b 100644 --- a/xCAT/postscripts/xcataixscript +++ b/xCAT/postscripts/xcataixscript @@ -91,7 +91,7 @@ if (!$installdir) { # IPv6, should only use NFS version 4 mount my $mcmd; my $snipcmd = "host $servnode"; -if ((&runcmd($snipcmd) == 0) && ($::outref =~ /:/)) +if (((&runcmd($snipcmd) == 0) && ($::outref =~ /:/)) || ($ENV{'USENFSV4ONAIX'} && ($ENV{'USENFSV4ONAIX'} =~ /1|Yes|yes|YES|Y|y/))) { $mcmd = "mkdir -p /xcatmnt; mount -o nolock -o vers=4 $servnode:$installdir/postscripts /xcatmnt"; } else {