From c62079eaff1fbb8d14d4a7fe5e52e878e36cdb2a Mon Sep 17 00:00:00 2001 From: sjing Date: Fri, 2 Mar 2012 04:17:16 +0000 Subject: [PATCH] no dump resource defined for osimage, but configdump is specified, report error. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11727 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index 6214865a7..c73d80c62 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -7853,6 +7853,34 @@ sub prenimnodeset } } + # no dump resource defined for osimage, but configdump is specified, report error. + my @badosi; + if (%attrs) + { + foreach my $attr (keys %attrs) + { + if ($attr =~ /^configdump$/) + { + foreach my $i (@image_names) + { + if (!$imghash{$i}{dump}) + { + push @badosi, $i; + } + } + } + + if (scalar @badosi) + { + my $badstring = join(',', @badosi); + my $rsp; + push @{$rsp->{data}}, "$Sname: No \'dump\' resource is defined for the osimage \'$badstring\', but the attribute \'$attr\' is specified. \n"; + xCAT::MsgUtils->message("E", $rsp, $callback); + return 1; + } + } + } + # add the "xcataixscript" script to each image def for standalone systems foreach my $i (@image_names) {