From 58831323b365deda08191fb008e525ac014dfb86 Mon Sep 17 00:00:00 2001 From: ligc Date: Tue, 18 Sep 2012 12:07:55 +0000 Subject: [PATCH] fix for bug 3568791: add nfs export options -vers 3:4 for /install/postscripts on SN git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13837 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/servicenode | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xCAT/postscripts/servicenode b/xCAT/postscripts/servicenode index a8e181d2c..caf38b294 100755 --- a/xCAT/postscripts/servicenode +++ b/xCAT/postscripts/servicenode @@ -196,7 +196,17 @@ sub setupAIXsn # check if /install/postscripts is in /etc/exports if (&runcmd("/bin/cat /etc/exports 2>/dev/null | grep '$installdir/postscripts ' >/dev/null 2>&1") != 0) { # if not add it and make sure it is exported - if (&runcmd("echo '$installdir/postscripts -ro' >> /etc/exports; exportfs -a") !=0 ) { + my $res; + if ($ENV{'USENFSV4ONAIX'} && ($ENV{'USENFSV4ONAIX'} =~ /1|Yes|yes|YES|Y|y/)) + { + $res = &runcmd("echo '$installdir/postscripts -vers=3:4,ro' >> /etc/exports; exportfs -a"); + } + else + { + $res = &runcmd("echo '$installdir/postscripts -ro' >> /etc/exports; exportfs -a"); + } + if ($res != 0) + { $msg = "$::sdate servicenode: Could not update the /etc/exports file.\n"; `logger -t xcat -p local4.warning $msg`; }