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;