-Support x86 by default for the generic boot image, rebuild nbfs on nbroot upgrades
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1202 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
ae07c1fbc3
commit
d5743ce561
@ -51,6 +51,12 @@ chmod 755 etc/init.d/S40network bin/getdestiny bin/getdestiny.awk bin/getipmi bi
|
||||
cd -
|
||||
|
||||
|
||||
%post
|
||||
if [ "$1" == "2" ]; then #only on upgrade, as on install it's probably not going
|
||||
#to work...
|
||||
. /etc/profile.d/xcat.sh
|
||||
mknb %{tarch}
|
||||
fi
|
||||
|
||||
%Files
|
||||
%defattr(-,root,root)
|
||||
|
@ -41,7 +41,7 @@ sub process_request {
|
||||
my $installdir = "/install";
|
||||
my $tftpdir = "/tftpboot";
|
||||
if (scalar(@{$request->{arg}}) != 1) {
|
||||
$callback->({error=>"Need to specifiy architecture (x86_64 or ppc64)"},{errorcode=>[1]});
|
||||
$callback->({error=>"Need to specifiy architecture (x86, x86_64 or ppc64)"},{errorcode=>[1]});
|
||||
return;
|
||||
}
|
||||
my $arch = $request->{arg}->[0];
|
||||
@ -106,8 +106,27 @@ sub process_request {
|
||||
chmod(0644,"$tftpdir/pxelinux.0");
|
||||
}
|
||||
}
|
||||
my $dopxe=0;
|
||||
foreach (keys %{$hexnets}) {
|
||||
if ($arch =~ /x86/) {
|
||||
$dopxe=0;
|
||||
if ($arch =~ /x86/) { #only do pxe if just x86 or x86_64 and no x86
|
||||
if ($arch =~ /x86_64/) {
|
||||
if (-r "$tftpdir/pxelinux.cfg/".uc($_)) {
|
||||
my $pcfg;
|
||||
open($pcfg,"<","$tftpdir/pxelinux.cfg/".uc($_));
|
||||
my @pcfgcontents = <$pcfg>;
|
||||
close($pcfg);
|
||||
if (grep (/x86_64/,@pcfgcontents)) {
|
||||
$dopxe=1;
|
||||
}
|
||||
} else {
|
||||
$dopxe=1;
|
||||
}
|
||||
} else {
|
||||
$dopxe=1;
|
||||
}
|
||||
}
|
||||
if ($dopxe) {
|
||||
open($cfgfile,">","$tftpdir/pxelinux.cfg/".uc($_));
|
||||
print $cfgfile "DEFAULT xCAT\n";
|
||||
print $cfgfile " LABEL xCAT\n";
|
||||
|
@ -22,7 +22,7 @@ Requires: atftp dhcp httpd nfs-utils expect conserver fping bind perl-XML-Parser
|
||||
%endif
|
||||
|
||||
%ifarch i386 i586 i686 x86 x86_64
|
||||
Requires: xCAT-nbroot-oss-x86_64 xCAT-nbroot-core-x86_64 xCAT-nbkernel-x86_64 syslinux
|
||||
Requires: xCAT-nbroot-oss-x86 xCAT-nbroot-core-x86 xCAT-nbkernel-x86 xCAT-nbroot-oss-x86_64 xCAT-nbroot-core-x86_64 xCAT-nbkernel-x86_64 syslinux
|
||||
Requires: ipmitool >= 1.8.9
|
||||
%endif
|
||||
|
||||
@ -163,6 +163,7 @@ if [ "$1" = "1" ]; then #Only if installing for the fist time..
|
||||
XCATROOT=$RPM_INSTALL_PREFIX0 /etc/init.d/xcatd start
|
||||
if [ -x $RPM_INSTALL_PREFIX0/sbin/mknb ]; then
|
||||
%ifarch i386 i586 i686 x86 x86_64
|
||||
$RPM_INSTALL_PREFIX0/sbin/mknb x86
|
||||
$RPM_INSTALL_PREFIX0/sbin/mknb x86_64
|
||||
%endif
|
||||
%ifarch ppc ppc64
|
||||
|
Loading…
Reference in New Issue
Block a user