From f2d9901d19d493bf5da4a43d92f130645faf4c00 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Mon, 29 Oct 2012 14:35:40 +0000 Subject: [PATCH] run xcatbased, kit specific and customized postbootscripts in order git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14148 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Postage.pm | 38 +++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm index 6ea625009..0e4f083a1 100644 --- a/xCAT-server/lib/perl/xCAT/Postage.pm +++ b/xCAT-server/lib/perl/xCAT/Postage.pm @@ -782,13 +782,49 @@ sub makescript my $ips = $et2->{'postbootscripts'}; if ($ips) { + my @xcatscripts; + my @kitscripts; + my @userscripts; push @scriptd, "# osimage-postbootscripts-start-here\n"; foreach my $n (split(/,/, $ips)) { +`echo $n > /tmp/scrips`; + if ( $n =~ /^BASEXCAT_/ ) + { + push @xcatscripts, $n. "\n"; + } + elsif ( $n =~ /^KIT_/ ) + { + push @kitscripts, $n. "\n"; + } + else + { + push @userscripts, $n. "\n"; + } + } + foreach my $n (@xcatscripts) + { if (!exists($postboot_hash{$n})) { $postboot_hash{$n} = 1; - push @scriptd, $n . "\n"; + push @scriptd, $n; + } + } + + foreach my $n (@kitscripts) + { + if (!exists($postboot_hash{$n})) + { + $postboot_hash{$n} = 1; + push @scriptd, $n; + } + } + foreach my $n (@userscripts) + { + if (!exists($postboot_hash{$n})) + { + $postboot_hash{$n} = 1; + push @scriptd, $n; } } push @scriptd, "# osimage-postbootscripts-end-here\n";