From 6a11d0230f42458c12f34aba26d7355a7fe0be0e Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 1 Apr 2013 15:57:14 +0000 Subject: [PATCH] fix for SF defect 3412 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@15765 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Postage.pm | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm index 9e554a752..101b68371 100644 --- a/xCAT-server/lib/perl/xCAT/Postage.pm +++ b/xCAT-server/lib/perl/xCAT/Postage.pm @@ -656,16 +656,15 @@ sub makescript } # get postscripts for images - my $osimgname = $provmethod; + my $et2; + if($provmethod !~ /^install$|^netboot$|^statelite$/){ # using imagename + my $osimgname = $provmethod; - if($osimgname =~ /install|netboot|statelite/){ - $osimgname = "$os-$arch-$provmethod-$profile"; - } - my $et2 = + $et2 = $ostab->getAttribs({'imagename' => "$osimgname"}, ['postscripts', 'postbootscripts']); - $ps = $et2->{'postscripts'}; - if ($ps) - { + $ps = $et2->{'postscripts'}; + if ($ps) + { foreach my $n (split(/,/, $ps)) { if (!exists($post_hash{$n})) @@ -674,6 +673,7 @@ sub makescript push @scriptd, $n . "\n"; } } + } } # get postscripts for node specific @@ -724,9 +724,10 @@ sub makescript } # get postbootscripts for image - my $ips = $et2->{'postbootscripts'}; - if ($ips) - { + if($provmethod !~ /^install$|^netboot$|^statelite$/){ # using imagename + my $ips = $et2->{'postbootscripts'}; + if ($ips) + { foreach my $n (split(/,/, $ips)) { if (!exists($postboot_hash{$n})) @@ -735,6 +736,7 @@ sub makescript push @scriptd, $n . "\n"; } } + } }