From 4e18f2810df5cc0f4ebe500cd67edff9fc565a9e Mon Sep 17 00:00:00 2001 From: ligc Date: Thu, 6 Aug 2009 01:33:14 +0000 Subject: [PATCH] fix for bug 2832009, set default imagetype=NIM if not specified with chdef git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3948 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/DBobjectdefs.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index 32aece49c..67664aa67 100644 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -1840,6 +1840,13 @@ sub defch } } # end - if type = node + #special case for osimage, if the osimage was not defined, + #chdef can not create it correctly if no attribute in osimage table is defined + #set the default imagetype 'NIM' if it is not specified + if ((!$isDefined) && ($type eq 'osimage') && (!defined($::FINALATTRS{$obj}{imagetype}))) + { + $::FINALATTRS{$obj}{imagetype} = 'NIM'; + } } # end - for each object to update