enhance of creating default netboot configuration file for p8 hardware discovery

This commit is contained in:
mellor 2014-09-24 20:23:20 -07:00
parent 7ae2e3d8f3
commit b06aa3afb0
2 changed files with 10 additions and 2 deletions

View File

@ -2418,7 +2418,7 @@ sub addnet
push @netent, " filename \"elilo.efi\";\n";
push @netent,
" } else if option client-architecture = 00:0e { #OPAL-v3\n ";
push @netent, " option conf-file = \"http://$tftp/tftpboot/pxelinux.cfg/p/default\";\n";
push @netent, " option conf-file = \"http://$tftp/tftpboot/pxelinux.cfg/p/".$net."_".$maskbits."\";\n";
push @netent,
" } else if substring(filename,0,1) = null { #otherwise, provide yaboot if the client isn't specific\n ";
push @netent, " filename \"/yaboot\";\n";

View File

@ -239,6 +239,14 @@ sub process_request {
close($cfg);
}
} elsif ($arch =~ /ppc/) {
open($cfgfile,">", "$tftpdir/pxelinux.cfg/p/$net");
print $cfgfile "default xCAT\n";
print $cfgfile " label xCAT\n";
print $cfgfile " kernel http://".$normnets->{$_}.":80/$tftpdir/xcat/genesis.kernel.$arch\n";
print $cfgfile " initrd http://".$normnets->{$_}.":80/$initrd_file\n";
print $cfgfile ' append "quiet xcatd='.$normnets->{$_}.":$xcatdport $consolecmdline\"\n";
close($cfgfile);
}
}
$dopxe=0;
@ -269,7 +277,7 @@ sub process_request {
print $cfgfile " APPEND initrd=xcat/nbfs.$arch.gz quiet xcatd=".$hexnets->{$_}.":$xcatdport $consolecmdline\n";
close($cfgfile);
} elsif ($arch =~ /ppc/) {
open($cfgfile,">", "$tftpdir/pxelinux.cfg/p/default");
open($cfgfile,">","$tftpdir/etc/".lc($_));
print $cfgfile "default xCAT\n";
print $cfgfile " label xCAT\n";
print $cfgfile " kernel http://".$hexnets->{$_}.":80/$tftpdir/xcat/genesis.kernel.$arch\n";