From e7f9eadd1e527e4e41d7585fd7ac17b4354672f1 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Thu, 4 Jul 2013 05:09:44 +0000 Subject: [PATCH] Make nodeset can pass parameter --noupdateinitrd to mkinstall command git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16875 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/destiny.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/destiny.pm b/xCAT-server/lib/xcat/plugins/destiny.pm index 8a4f1bee4..4e2556370 100644 --- a/xCAT-server/lib/xcat/plugins/destiny.pm +++ b/xCAT-server/lib/xcat/plugins/destiny.pm @@ -14,6 +14,7 @@ use Sys::Syslog; use xCAT::GlobalDef; use xCAT::Table; use xCAT_monitoring::monitorctrl; +use Getopt::Long; use strict; my $request; @@ -89,7 +90,12 @@ sub setdestiny { $chaintab = xCAT::Table->new('chain',-create=>1); my @nodes=@{$req->{node}}; - my $state = $req->{arg}->[0]; + + @ARGV = @{$request->{arg}}; + my $noupdateinitrd; + GetOptions('noupdateinitrd' => \$noupdateinitrd,); + + my $state = $ARGV[0]; my $reststates; # to support the case that the state could be runimage=xxx,runimage=yyy,osimage=xxx @@ -297,7 +303,8 @@ sub setdestiny { #print "state=$tempstate nodes=@$samestatenodes\n"; $errored=0; $subreq->({command=>["mk$tempstate"], - node=>$samestatenodes}, \&relay_response); + node=>$samestatenodes, + noupdateinitrd=>$noupdateinitrd}, \&relay_response); if ($errored) { $callback->({error=>"Some nodes failed to set up $state resources, aborting"}); return;