From 53031e65dbbbfd4fd9d0eff9a57d8009d1c64d1d Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Thu, 15 Apr 2010 06:56:26 +0000 Subject: [PATCH] Fixed bug 2987151: makedhcp have one issue with a clean DHCP configuration file on AIX git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5774 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/dhcp.pm | 29 ++++++++++++++------------- xCAT-server/lib/xcat/plugins/lsslp.pm | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 44e945b71..19eabc60c 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -705,6 +705,21 @@ sub process_request } } + foreach (@nrn) + { + my @line = split /:/; + my $firstoctet = $line[0]; + $firstoctet =~ s/^(\d+)\..*/$1/; + if ($line[0] eq "169.254.0.0" or ($firstoctet >= 224 and $firstoctet <= 239)) + { + next; + } + if ($activenics{$line[1]} and $line[3] !~ /G/) + { + addnet($line[0], $line[2]); + } + } + if ($req->{node}) { my $ip_hash; @@ -783,20 +798,6 @@ sub process_request } close($omshell) if ($^O ne 'aix'); } - foreach (@nrn) - { - my @line = split /:/; - my $firstoctet = $line[0]; - $firstoctet =~ s/^(\d+)\..*/$1/; - if ($line[0] eq "169.254.0.0" or ($firstoctet >= 224 and $firstoctet <= 239)) - { - next; - } - if ($activenics{$line[1]} and $line[3] !~ /G/) - { - addnet($line[0], $line[2]); - } - } writeout(); if ($restartdhcp) { if ( $^O eq 'aix') diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index e35f82fb9..7d16f3bcc 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -1906,7 +1906,7 @@ sub do_makedhcp { $string = "Add following nodes to dhcp server: \n$node\n"; send_msg( $request, 0, $string ); - `makedhcp -n $node`; + `makedhcp $node`; send_msg( $request, 0, "\nMakedhcp finished.\n" );