diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 7a46bcaf2..1a936d5c8 100755 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -881,8 +881,8 @@ sub check_options xCAT::MsgUtils->message("I", $rsp, $callback, 0); return 0; } - # if not help, dhcpd needs to be running - if (!($opt->{h})) { + # if not help and not -n, dhcpd needs to be running + if (!($opt->{h})&& (!($opt->{n}))) { if (xCAT::Utils->isLinux()) { my @output = xCAT::Utils->runcmd("service dhcpd status", -1); if ($::RUNCMD_RC != 0) { # not running