mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 17:46:38 +00:00
Merge pull request #178 from samveen/fix_GH177
Fix for #177 (`chdef ` clobbers existing objects with `-n` option)
This commit is contained in:
commit
0a16adde70
@ -1842,6 +1842,14 @@ sub defch
|
||||
return 1;
|
||||
}
|
||||
|
||||
# Ensure that the target object doesn't exist
|
||||
if (grep /^$::opt_n$/, @validnode) {
|
||||
my $rsp;
|
||||
push @{$rsp->{data}}, "Object $::opt_n already exists.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 1;
|
||||
}
|
||||
|
||||
# Use the getobjdefs function to get a hash which including
|
||||
# all the records in the table that should be changed
|
||||
my %chnamehash = ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user