From b2c60fdfb7a05e724212619832455bae5121d159 Mon Sep 17 00:00:00 2001 From: zhanx Date: Wed, 20 May 2009 10:37:00 +0000 Subject: [PATCH] Fix bug 'chvm attr=value does not work if lpar has not been booted', sourceforge bug ID: 2793860 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3413 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCvm.pm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/perl-xCAT/xCAT/PPCvm.pm b/perl-xCAT/xCAT/PPCvm.pm index 428bf9fa7..bbfb814e2 100644 --- a/perl-xCAT/xCAT/PPCvm.pm +++ b/perl-xCAT/xCAT/PPCvm.pm @@ -742,6 +742,26 @@ sub modify_by_attr { push @values, [$lpar, @$cfg_res[0], $Rc]; next; } + ############################################## + # If there is no curr_profile, which means no + # profile has been applied yet (before first + # boot?), use the default_profile + ############################################## + if ( ! @$cfg_res[0]) + { + $cfg_res = xCAT::PPCcli::lssyscfg( + $exp, + "node", + $cec, + 'default_profile', + @$d[0]); + $Rc = shift(@$cfg_res); + if ( $Rc != SUCCESS ) { + push @values, [$lpar, @$cfg_res[0], $Rc]; + next; + } + } + my $prof = xCAT::PPCcli::lssyscfg( $exp,