update error messages

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14877 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
creativezj 2013-01-15 01:56:16 +00:00
parent f740315ef2
commit a7b54d89d5

View File

@ -111,7 +111,15 @@ sub process_request {
if (grep{ $_ eq $command} ("nodeimport", "nodepurge", "nodechprofile", "nodeaddunmged", "nodechmac")){
my $discover_running = xCAT::ProfiledNodeUtils->is_discover_started();
if ($discover_running){
setrsp_errormsg("Cannot run the $command command, the node discovery process is already running.");
my %errormsg_dict = (
'nodeimport' => 'import nodes',
'nodepurge' => 'remove nodes',
'nodechprofile' => 'change profiles',
'nodeaddunmged' => 'add devices',
'nodechmac' => 'change MAC address'
);
setrsp_errormsg("Cannot $errormsg_dict{$command} while node discovery is running.");
xCAT::Utils->release_lock($lock, 1);
return;
}