From 53b2765c7a2b643144a1b95820fdbe3cb9d9e1d3 Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 24 Oct 2011 09:44:22 +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@10862 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/AAsn.pm | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/AAsn.pm b/xCAT-server/lib/xcat/plugins/AAsn.pm index 6436383b3..1c7accd97 100644 --- a/xCAT-server/lib/xcat/plugins/AAsn.pm +++ b/xCAT-server/lib/xcat/plugins/AAsn.pm @@ -413,7 +413,15 @@ sub setupInstallloc { # not mounted # need to mount the directory - my $cmd = "mount -o rw,nolock $master:$installloc $installdir"; + my $cmd; + my @nfsv4 = xCAT::Utils->get_site_attribute("useNFSv4onAIX"); + if ($nfsv4[0] && ($nfsv4[0] =~ /1|Yes|yes|YES|Y|y/)) + { + $cmd = "mount -o vers=4,rw,nolock $master:$installloc $installdir"; + } + else + { + $cmd = "mount -o rw,nolock $master:$installloc $installdir"; system $cmd; if ($? > 0) { # error @@ -1181,7 +1189,16 @@ sub setup_TFTP { # need to mount the directory - my $cmd = " mount -o rw,nolock $tftphost:$tftpdir $tftpdir"; + my $cmd; + my @nfsv4 = xCAT::Utils->get_site_attribute("useNFSv4onAIX"); + if ($nfsv4[0] && ($nfsv4[0] =~ /1|Yes|yes|YES|Y|y/)) + { + $cmd = " mount -o vers=4,rw,nolock $tftphost:$tftpdir $tftpdir"; + } + else + { + $cmd = " mount -o rw,nolock $tftphost:$tftpdir $tftpdir"; + } system $cmd; if ($? > 0) { # error