fix for rmnimimage -s servicenode image

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7384 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
sjing 2010-09-09 02:36:43 +00:00
parent 9a7b4ff7ff
commit 2a05ae09bf

View File

@ -4497,9 +4497,23 @@ sub rmnimimage
{
# is it allocated?
my $alloc_count =
xCAT::InstUtils->get_nim_attr_val($resname, "alloc_count",
my $alloc_count;
# only change the logic for -s flag,
# keep the original logic for other scenarios
if ($::SERVERLIST)
{
# get local hostname as target
my $hn = `hostname`;
$alloc_count =
xCAT::InstUtils->get_nim_attr_val($resname, "alloc_count",
$callback, $hn, $subreq);
}
else
{
$alloc_count =
xCAT::InstUtils->get_nim_attr_val($resname, "alloc_count",
$callback, "", $subreq);
}
if (defined($alloc_count) && ($alloc_count != 0))
{