From 42a4fb0e5efd6f734a277d2ef318949d4163605e Mon Sep 17 00:00:00 2001 From: linggao Date: Wed, 10 Sep 2008 00:20:02 +0000 Subject: [PATCH] more work on installing extra packages git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2114 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Postage.pm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/perl-xCAT/xCAT/Postage.pm b/perl-xCAT/xCAT/Postage.pm index 13f9134d3..a4299c0e1 100644 --- a/perl-xCAT/xCAT/Postage.pm +++ b/perl-xCAT/xCAT/Postage.pm @@ -212,6 +212,7 @@ sub makescript { } #get packge names for extra rpms + my $stat="install"; if ($profile) { my $platform="rh"; if ($os) { @@ -221,7 +222,6 @@ sub makescript { elsif ($os =~ /sles.*/) { $platform = "sles"; } elsif ($os =~ /aix.*/) { $platform = "aix"; } } - my $stat="install"; if (($nodesetstate) && ($nodesetstate eq "netboot")) { $stat="netboot";} my $pathtofiles="$::XCATROOT/share/xcat/$stat/$platform"; my $pkglist; @@ -259,18 +259,20 @@ sub makescript { my $et = $posttab->getAttribs({node=>"xcatdefaults"},'postscripts'); my $defscripts = $et->{'postscripts'}; if ($defscripts) { - foreach my $n (split(/,/, $defscripts)) { - push @scriptd, $n."\n"; - } + foreach my $n (split(/,/, $defscripts)) { + if (($n eq "otherpkgs") && ($stat eq "netboot")) { next; } #skip 'otherpkgs' for diskless case + push @scriptd, $n."\n"; + } } # get postscripts my $et = $posttab->getNodeAttribs($node, ['postscripts']); $ps = $et->{'postscripts'}; if ($ps) { - foreach my $n (split(/,/, $ps)) { - push @scriptd, $n."\n"; - } + foreach my $n (split(/,/, $ps)) { + if (($n eq "otherpkgs") && ($stat eq "netboot")) { next; } #skip 'otherpkgs' for diskless case + push @scriptd, $n."\n"; + } }