Forbid removing all /etc/hosts entries from DNS with makedns -d as it pretty well corrupts most configs

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9983 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2011-06-29 17:57:25 +00:00
parent 89743f5fbc
commit 72f0ae7b4f

View File

@ -241,6 +241,11 @@ sub process_request {
} elsif ($allnodes) {
#read all nodelist specified nodes
} else {
if ($deletemode) {
#when this was permitted, it really ruined peoples' days
xCAT::SvrUtils::sendmsg([1,"makedns -d without noderange or -a is not supported"],$callback);
return;
}
#legacy behavior, read from /etc/hosts
my $hostsfile;
open($hostsfile,"<","/etc/hosts");