-Be more specific abount looking for -n argument on makedhcp
-Have nodeonmynet function more gracefully handle being passed an unresolvable name git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@863 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
@@ -1211,6 +1211,9 @@ sub nodeonmynet
|
||||
{
|
||||
$nodetocheck = shift;
|
||||
}
|
||||
unless (inet_aton($nodetocheck)) {
|
||||
return 0;
|
||||
}
|
||||
my $nodeip = inet_ntoa(inet_aton($nodetocheck));
|
||||
unless ($nodeip =~ /\d+\.\d+\.\d+\.\d+/)
|
||||
{
|
||||
|
@@ -227,7 +227,7 @@ sub process_request {
|
||||
$callback->({data=>["Usage: makedhcp <-n> <noderange>"]});
|
||||
return;
|
||||
}
|
||||
if (grep /-n/,@{$req->{arg}}) {
|
||||
if (grep /^-n$/,@{$req->{arg}}) {
|
||||
if (-e "/etc/dhcpd.conf") {
|
||||
my $bakname = "/etc/dhcpd.conf.xcatbak";
|
||||
rename("/etc/dhcpd.conf",$bakname);
|
||||
|
Reference in New Issue
Block a user