backout 3528566 , migration issue
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12872 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
e19dd4583a
commit
d5707e6562
@ -1529,9 +1529,7 @@ sub setupAIXIPMITool
|
||||
|
||||
=head3 setupAIXexports
|
||||
|
||||
Set AIX exports
|
||||
remove the old /install/postscripts export and add
|
||||
a /install export
|
||||
Set AIX exports
|
||||
|
||||
=cut
|
||||
|
||||
@ -1540,42 +1538,25 @@ sub setupAIXIPMITool
|
||||
sub setupAIXexports
|
||||
|
||||
{
|
||||
# check if /install/postscripts is exported, remove it
|
||||
# check if /install/postscripts is exported
|
||||
my $lsnfsexpcmd =
|
||||
"/usr/sbin/lsnfsexp -d $::INSTALLDIR/postscripts 2>&1";
|
||||
my $outref = xCAT::Utils->runcmd("$lsnfsexpcmd", -1);
|
||||
if ($::RUNCMD_RC == 0)
|
||||
{
|
||||
if ($outref) { # really is exported
|
||||
# remove it
|
||||
my $rmnfsexpcmd= "/usr/sbin/rmnfsexp -d $::INSTALLDIR/postscripts 2>&1";
|
||||
xCAT::Utils->runcmd("$rmnfsexpcmd", -1);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
xCAT::MsgUtils->message('E',
|
||||
"Could not unexport directory $::INSTALLDIR/postscripts.");
|
||||
}
|
||||
}
|
||||
}
|
||||
# check if /install is exported
|
||||
my $lsnfsexpcmd =
|
||||
"/usr/sbin/lsnfsexp -d $::INSTALLDIR 2>&1";
|
||||
my $outref = xCAT::Utils->runcmd("$lsnfsexpcmd", -1);
|
||||
if (($::RUNCMD_RC != 0) || ($outref !~ /-vers=3:4/))
|
||||
{
|
||||
|
||||
# if not exported for both NFS version 3 and version 4,
|
||||
# make sure it is exported with -vers=3:4
|
||||
my $rmnfsexpcmd = "/usr/sbin/rmnfsexp -d $::INSTALLDIR 2>&1";
|
||||
my $rmnfsexpcmd = "/usr/sbin/rmnfsexp -d $::INSTALLDIR/postscripts 2>&1";
|
||||
xCAT::Utils->runcmd("$rmnfsexpcmd", -1);
|
||||
|
||||
my $mknfsexpcmd =
|
||||
"mknfsexp -d $::INSTALLDIR '-B' -v '3,4' -t 'ro'";
|
||||
"mknfsexp -d $::INSTALLDIR/postscripts '-B' -v '3,4' -t 'ro'";
|
||||
my $outref2 = xCAT::Utils->runcmd("$mknfsexpcmd", -1);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
xCAT::MsgUtils->message('E',
|
||||
"Could not export directory $::INSTALLDIR.");
|
||||
"Could not export directory $::INSTALLDIR/postscripts.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user