From 3133cbeb3f982aca9d9df4243f7e0369b1ae6c14 Mon Sep 17 00:00:00 2001 From: mellor Date: Mon, 29 Sep 2014 21:26:52 -0700 Subject: [PATCH] 1. add xCAT depend on xcat-genesis-scripts, 2. fix mknb issue, 3. modify xcatconfig to call mknb --- xCAT-server/lib/xcat/plugins/mknb.pm | 3 +++ xCAT-server/sbin/xcatconfig | 5 ++++- xCAT/debian/control | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/mknb.pm b/xCAT-server/lib/xcat/plugins/mknb.pm index f9c3316ba..e4cd41283 100644 --- a/xCAT-server/lib/xcat/plugins/mknb.pm +++ b/xCAT-server/lib/xcat/plugins/mknb.pm @@ -78,6 +78,9 @@ sub process_request { $callback->({error=>["Failed to create a temporary directory"],errorcode=>[1]}); return; } + unless (-e "$tftpdir/xcat") { + mkpath("$tftpdir/xcat"); + } my $rc; my $invisibletouch=0; if (-e "$::XCATROOT/share/xcat/netboot/genesis/$arch") { diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index 111cf5497..088388a3b 100755 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -1873,6 +1873,9 @@ sub mknb # the xCAT-genesis-base.spec file touches /etc/xcat/genesis-base-updated, # so we know to run mknb here. my $cmd; + if ($::arch =~ /ppc/) { + $::arch = "ppc64"; + } if ((($::arch eq "x86_64") ||($::arch =~ /ppc/)) && (-f '/etc/xcat/genesis-scripts-updated') ) { unlink '/etc/xcat/genesis-scripts-updated'; # Do not print messages or run command twice @@ -1888,7 +1891,7 @@ sub mknb $cmd = "$::XCATROOT/sbin/mknb $::arch"; xCAT::MsgUtils->message('I', "Running '$cmd', triggered by the installation/update of xCAT-genesis-base-$::arch ..."); } - #my $outref = xCAT::Utils->runcmd("$cmd", 0); + my $outref = xCAT::Utils->runcmd("$cmd", 0); if ($cmd) { system($cmd); if ($? != 0) { diff --git a/xCAT/debian/control b/xCAT/debian/control index 069be17d8..31c38c62d 100644 --- a/xCAT/debian/control +++ b/xCAT/debian/control @@ -7,6 +7,6 @@ Standards-Version: 3.7.2 Package: xcat Architecture: amd64 ppc64el -Depends: ${perl:Depends}, xcat-server, xcat-client, libdbd-sqlite3-perl, isc-dhcp-server, apache2, nfs-kernel-server, nmap, bind9, libxml-parser-perl, xinetd, tftpd-hpa, tftp-hpa, conserver-xcat, libnet-telnet-perl, ipmitool-xcat (>=1.8.9), syslinux[any-amd64], libsys-virt-perl, syslinux-xcat[any-amd64], xnba-undi[any-amd64], xcat-genesis-scripts-amd64[any-amd64], elilo-xcat[any-amd64] +Depends: ${perl:Depends}, xcat-server, xcat-client, libdbd-sqlite3-perl, isc-dhcp-server, apache2, nfs-kernel-server, nmap, bind9, libxml-parser-perl, xinetd, tftpd-hpa, tftp-hpa, conserver-xcat, libnet-telnet-perl, ipmitool-xcat (>=1.8.9), syslinux[any-amd64], libsys-virt-perl, syslinux-xcat[any-amd64], xnba-undi[any-amd64], xcat-genesis-scripts, elilo-xcat[any-amd64] Description: Server and configuration utilities of the xCAT management project xcat-server provides the core server and configuration management components of xCAT. This package should be installed on your management server