2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

polished the ddns.pm based on comments

This commit is contained in:
bybai 2016-08-30 22:33:21 -04:00
parent 12773c44fc
commit eedf5d7069

View File

@ -441,11 +441,11 @@ sub process_request {
xCAT::SvrUtils::sendmsg(":Ignoring line $_ in /etc/hosts, names $names contain invalid characters (valid characters include a through z, numbers and the '-', but not '_'", $callback);
next;
}
$invalid = "";
@eachhost = split(/ /,$names);
foreach my $hname (@eachhost) {
unless ($hname !~ /^\.[a-z0-9]+/i) {
xCAT::SvrUtils::sendmsg(":Ignoring line $_ in /etc/hosts, names $names start with . ", $callback);
if ($hname =~ /^\./) {
xCAT::SvrUtils::sendmsg(":Ignoring line $_ in /etc/hosts, name $hname start with . ", $callback);
$invalid = $names;
last;
}