mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-24 12:10:25 +00:00
Merge pull request #1340 from mavscjb/master
Check if the postscript is only for diskless
This commit is contained in:
@@ -1356,7 +1356,7 @@ sub gen_chain_for_profiles{
|
||||
}
|
||||
|
||||
if ((exists $netprofileattr->{"bmc"}) and $hw_reconfig){
|
||||
if ((($netboot eq 'petitboot') and ($comments eq 'openpower')) or ($netboot ne 'petiboot'))
|
||||
if ((($netboot eq 'petitboot') and ($comments eq 'openpower')) or ($netboot ne 'petitboot'))
|
||||
{
|
||||
if (index($final_chain, "runcmd=bmcsetup") == -1){
|
||||
$final_chain = 'runcmd=bmcsetup,'.$final_chain.':reboot4deploy';
|
||||
|
@@ -21,6 +21,7 @@ require Exporter;
|
||||
"1438724467.511049" => "centos6.7",#x86_64
|
||||
"1404489053.504589" => "centos7.0",
|
||||
"1427495138.035654" => "centos7.1",
|
||||
"1450147276.351714" => "centos7.2", #ppc64le
|
||||
"1176234647.982657" => "centos5",
|
||||
"1156364963.862322" => "centos4.4",
|
||||
"1178480581.024704" => "centos4.5",
|
||||
|
@@ -1184,6 +1184,9 @@ sub edit_bldkitconf
|
||||
if ($debianflag){
|
||||
s/(filename=.*?)\-(.*)\.noarch\.rpm/$1_$2_all.deb/;
|
||||
}
|
||||
if ($osbasename =~ /rh/){
|
||||
s/.*<<<INSERT_compatible_HERE_>>>/ compat_osbasenames=centos/;
|
||||
}
|
||||
}
|
||||
|
||||
# Write the buildkit.conf back out
|
||||
|
@@ -107,7 +107,7 @@ kitrepo:
|
||||
osmajorversion=<<<INSERT_osmajorversion_HERE>>>
|
||||
osminorversion=<<<INSERT_osminorversion_HERE>>>
|
||||
osarch=<<<INSERT_osarch_HERE>>>
|
||||
# compat_osbasenames=
|
||||
# compat_osbasenames=<<<INSERT_compatible_HERE_>>>
|
||||
#
|
||||
# kitcomponent: This stanza defines one Kit Component.
|
||||
# There can be zero or more kitcomponent stanzas.
|
||||
|
@@ -436,6 +436,13 @@ sub assign_to_osimage
|
||||
}
|
||||
|
||||
if ( $osimagetable->{provmethod} =~ /install/ ) {
|
||||
# If the script is only for diskless node
|
||||
my $cmd = "grep \"#FLAG FOR DISKLESS ONLY#\" $installdir/postscripts/$kitcompscript";
|
||||
my $res = xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($res eq "#FLAG FOR DISKLESS ONLY#"){
|
||||
next;
|
||||
}
|
||||
|
||||
# for diskfull node
|
||||
my $match = 0;
|
||||
my @scripts = split ',', $osimagetable->{postbootscripts};
|
||||
|
Reference in New Issue
Block a user