From 40a74f4310d9aca623e950568f3f3c82b37afc10 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 30 Oct 2012 11:10:12 +0000 Subject: [PATCH] check if MN defined git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14158 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Utils.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index 1528881c5..4bc678c9c 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -2992,10 +2992,12 @@ sub noderangecontainsMn } } } - if (grep(/$mname/, @noderange)) { # if MN in the noderange - return $mname; - } else { - return ; + if ($mname) { # if Management Node defined in the database + if (grep(/$mname/, @noderange)) { # if MN in the noderange + return $mname; + } else { + return ; + } } }