diff --git a/xCAT-server/lib/xcat/plugins/AAsn.pm b/xCAT-server/lib/xcat/plugins/AAsn.pm index 1780f8e2f..245e9014e 100644 --- a/xCAT-server/lib/xcat/plugins/AAsn.pm +++ b/xCAT-server/lib/xcat/plugins/AAsn.pm @@ -388,6 +388,7 @@ sub setup_CONS # make the consever 8 configuration file my $cmdref; $cmdref->{command}->[0] = "makeconservercf"; + $cmdref->{arg}->[0] = "-l"; $cmdref->{cwd}->[0] = "/opt/xcat/sbin"; $cmdref->{svboot}->[0] = "yes"; @@ -448,6 +449,7 @@ sub setup_DHCP } my $cmdref; $cmdref->{command}->[0] = "makedhcp"; + $cmdref->{arg}->[0] = "-l"; $cmdref->{cwd}->[0] = "/opt/xcat/sbin"; $cmdref->{arg}->[0] = "-n"; @@ -462,6 +464,7 @@ sub setup_DHCP } $cmdref; $cmdref->{command}->[0] = "makedhcp"; + $cmdref->{arg}->[0] = "-l"; $cmdref->{cwd}->[0] = "/opt/xcat/sbin"; $cmdref->{arg}->[0] = "-a"; diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 2782cdc80..e92737537 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -298,18 +298,23 @@ sub preprocess_request { my $req = shift; $callback = shift; + my $localonly + @ARGV = @{$req->{arg}}; + GetOptions('l' => \$localonly); if ($req->{_xcatdest}) { return [$req]; } #Exit if the packet has been preprocessed in its history my @requests = ({%$req}); #Start with a straight copy to reflect local instance - my @sn = xCAT::Utils->getSNList('dhcpserver'); - foreach my $s (@sn) - { - my $reqcopy = {%$req}; - $reqcopy->{'_xcatdest'} = $s; - push @requests, $reqcopy; + unless ($localonly) { + my @sn = xCAT::Utils->getSNList('dhcpserver'); + foreach my $s (@sn) + { + my $reqcopy = {%$req}; + $reqcopy->{'_xcatdest'} = $s; + push @requests, $reqcopy; + } } if (scalar(@requests) > 1) { #hierarchy detected, enforce more rigorous sanity