From 124bbda40c3f1c1ecbc597c58503d2e9579688dd Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 13 Nov 2009 19:51:33 +0000 Subject: [PATCH] -Fix override of plugins git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4568 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatd | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 468582efd..c24be7a88 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -683,6 +683,7 @@ sub plugin_command { my $sock = shift; my $callback = shift; my %handler_hash; + my $usesiteglobal = 0; use xCAT::NodeRange qw/extnoderange nodesmissed noderange/; $Main::resps={}; my @nodes; @@ -725,6 +726,7 @@ sub plugin_command { $useglobals = -1; #If they tried to specify anything, don't use the default global handlers at all unless (@nodes) { $handler_hash{$sent->{value}} = 1; + $usesiteglobal = 1; } foreach (@nodes) { #Specified a specific plugin, not a table lookup $handler_hash{$sent->{value}}->{$_} = 1; @@ -800,7 +802,17 @@ sub plugin_command { } } } elsif ($useglobals == 0) { + unless (@nodes or $usesiteglobal) { #if something like 'makedhcp -n', + foreach (keys %handler_hash) { + if ($handler_hash{$_} == 1) { + delete ($handler_hash{$_}) + } + } + } foreach $hdlspec (@globalhandlers) { + unless (@nodes or $usesiteglobal) { + $handler_hash{$hdlspec} = 1; + } foreach (keys %unhandled_nodes) { #Specified a specific plugin, not a table lookup $handler_hash{$hdlspec}->{$_} = 1; }