diff --git a/xCAT-server-2.0/lib/xcat/plugins/DHCPsn.pm b/xCAT-server-2.0/lib/xcat/plugins/DHCPsn.pm index d92ff6069..3b2bc4e84 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/DHCPsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/DHCPsn.pm @@ -118,6 +118,7 @@ sub setup_DHCP ${"xCAT_plugin::" . $modname . "::"}{process_request} ->($cmdref, \&xCAT::Client::handle_response); + $cmd = "chkconfig dhcpd on"; xCAT::Utils->runcmd($cmd, -1); if ($::RUNCMD_RC != 0) @@ -132,6 +133,14 @@ sub setup_DHCP xCAT::MsgUtils->message("S", "Error from $cmd"); return 1; } + $cmdref; + $cmdref->{command}->[0] = "makedhcp"; + $cmdref->{cwd}->[0] = "/opt/xcat/sbin"; + $cmdref->{arg}->[0] = "-a"; + + my $modname = "dhcp"; + ${"xCAT_plugin::" . $modname . "::"}{process_request} + ->($cmdref, \&xCAT::Client::handle_response); } else