From 7f2a3b8ea466dc50b9cfada0f156566f00781984 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 24 Jan 2008 13:37:34 +0000 Subject: [PATCH] -Correct node deletion if a simple format mac entry is referenced, or none at all. -Factor out plugin call in preparation for hierarchical dispatch git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@323 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/dhcp.pm | 1 + xCAT-server-2.0/sbin/xcatd | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm b/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm index 62ee7e349..b15ae81e8 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm @@ -37,6 +37,7 @@ sub delnode { my $mac; my $hname; ($mac,$hname) = split (/!/,$mace); + unless ($hmame) { $hmame = $node; } print $omshell "new host\n"; print $omshell "set name = \"$hname\"\n"; #Find and destroy conflict name print $omshell "open\n"; diff --git a/xCAT-server-2.0/sbin/xcatd b/xCAT-server-2.0/sbin/xcatd index 7177938f4..3e1bb6d68 100755 --- a/xCAT-server-2.0/sbin/xcatd +++ b/xCAT-server-2.0/sbin/xcatd @@ -535,7 +535,8 @@ sub plugin_command { $req->{node}=\@nodes; } no strict "refs"; - ${"xCAT_plugin::".$modname."::"}{process_request}->($req,$callback,\&do_request); + dispatch_request($req,$callback,$modname); + #${"xCAT_plugin::".$modname."::"}{process_request}->($req,$callback,\&do_request); $$progname=$oldprogname; if ($sock) { close($parent_fd); @@ -561,6 +562,14 @@ sub plugin_command { } +sub dispatch_request { + my $req = shift; + my $callback = shift; + my $modname = shift; + no strict "refs"; + ${"xCAT_plugin::".$modname."::"}{process_request}->($req,$callback,\&do_request); +} + sub do_request { my $req = shift; my $second = shift;