-Have NFSsn.pm set up bind mounts for ftp to work

-Have nodediscover populate noderes.primarynic with a guess if admin omitted


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1327 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-05-07 21:15:13 +00:00
parent acaa73631f
commit a5857d7c5b
2 changed files with 11 additions and 1 deletions

View File

@ -7,6 +7,7 @@ use xCAT::Table;
use xCAT::Utils;
use xCAT::MsgUtils;
use File::Path;
use Getopt::Long;
#-------------------------------------------------------
@ -103,6 +104,10 @@ sub setup_NFS
my $arch;
# make sure vsftpd is started
mkpath "/var/ftp/install";
mkpath "/var/ftp/tftpboot";
system "mount -o bind $installdir /var/ftp/install";
system "mount -o bind /tftpboot /var/ftp/tftpboot";
my $cmd = "service vsftpd start";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)

View File

@ -102,6 +102,7 @@ sub process_request {
$vpdtab->setNodeAttribs($node,{serial=>$request->{serial}->[0]});
}
}
my $nrtab;
if (defined($request->{arch})) {
#Set the architecture in nodetype. If 32-bit only x86 or ppc detected, overwrite. If x86_64, only set if either not set or not an x86 family
my $typetab=xCAT::Table->new("nodetype",-create=>1);
@ -115,7 +116,7 @@ sub process_request {
$typetab->setNodeAttribs($node,{arch=>$request->{arch}->[0]});
}
my $currboot='';
my $nrtab = xCAT::Table->new('noderes'); #Attempt to check and set if wrong the netboot method on discovery, if admin omitted
$nrtab = xCAT::Table->new('noderes'); #Attempt to check and set if wrong the netboot method on discovery, if admin omitted
(my $rent) = $nrtab->getNodeAttribs($node,'netboot');
if ($rent and $rent->{'netboot'}) {
$currboot=$rent->{'netboot'};
@ -141,6 +142,10 @@ sub process_request {
my $netn = inet_ntoa(pack("N",$ipn & $mask));
my $hosttag = gethosttag($node,$netn,@ifinfo[1],\%usednames);
if ($hosttag) {
(my $rent) = $nrtab->getNodeAttribs($node,'primarynic');
unless ($rent and $rent->{primarynic}) { #if primarynic not set, set it to this nic
$nrtab->setNodeAttribs($node,{primarynic=>@ifinfo[1]});
}
$usednames{$hosttag}=1;
$macstring .= $ifinfo[2]."!".$hosttag."|";
} else {