From 2c970102c5b2f16a0162a395ebae97cdb4ee90ae Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 27 Mar 2009 22:09:54 +0000 Subject: [PATCH] -Have pxe and yaboot only do hierarchical DHCP manipulation when not already farmed out git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3022 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/pxe.pm | 7 ++++++- xCAT-server/lib/xcat/plugins/yaboot.pm | 15 +++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/pxe.pm b/xCAT-server/lib/xcat/plugins/pxe.pm index ff4c537ad..48e89825b 100644 --- a/xCAT-server/lib/xcat/plugins/pxe.pm +++ b/xCAT-server/lib/xcat/plugins/pxe.pm @@ -276,7 +276,7 @@ sub process_request { } #if not shared, then help sync up - if ($req->{_disparatetftp}) { #reading hint from preprocess_command + if ($req->{'_disparatetftp'}->[0]) { #reading hint from preprocess_command @nodes = (); foreach (@rnodes) { if (xCAT::Utils->nodeonmynet($_)) { @@ -339,9 +339,14 @@ sub process_request { } } if ($args[0] ne 'stat') { + if ($req->{'_disparatetftp'}->[0]) { #reading hint from preprocess_command + $sub_req->({command=>['makedhcp'],arg=>['-l'], + node=>\@nodes},$callback); + } else { $sub_req->({command=>['makedhcp'], node=>\@nodes},$callback); } + } } diff --git a/xCAT-server/lib/xcat/plugins/yaboot.pm b/xCAT-server/lib/xcat/plugins/yaboot.pm index bb44dd5d7..c58d2abbb 100644 --- a/xCAT-server/lib/xcat/plugins/yaboot.pm +++ b/xCAT-server/lib/xcat/plugins/yaboot.pm @@ -256,7 +256,7 @@ sub process_request { #back to normal business #if not shared tftpdir, then filter, otherwise, set up everything - if ($req->{_disparatetftp}) { #reading hint from preprocess_command + if ($req->{'_disparatetftp'}->[0]) { #reading hint from preprocess_command @nodes = (); foreach (@rnodes) { if (xCAT::Utils->nodeonmynet($_)) { @@ -320,12 +320,23 @@ sub process_request { } } my @normalnodeset = keys %normalnodes; + if ($req->{'_disparatetftp'}->[0]) { #reading hint from preprocess_command, only change local settings if already farmed + $sub_req->({command=>['makedhcp'],arg=>['-l'], + node=>\@normalnodeset},$callback); + } else { $sub_req->({command=>['makedhcp'], node=>\@normalnodeset},$callback); + } my @breaknetboot=keys %breaknetbootnodes; - $sub_req->({command=>['makedhcp'], + if ($req->{'_disparatetftp'}->[0]) { #reading hint from preprocess_command + $sub_req->({command=>['makedhcp'], + node=>\@breaknetboot, + arg=>['-l','-s','filename = \"xcat/nonexistant_file_to_intentionally_break_netboot_for_localboot_to_work\";']},$callback); + } else { + $sub_req->({command=>['makedhcp'], node=>\@breaknetboot, arg=>['-s','filename = \"xcat/nonexistant_file_to_intentionally_break_netboot_for_localboot_to_work\";']},$callback); + } }