From e3c48f5dbda4228b02b99e9e2e0e70871ad893aa Mon Sep 17 00:00:00 2001 From: jwsimpson Date: Tue, 4 Jun 2013 12:29:22 +0000 Subject: [PATCH] adding check for -n to 2.8.3 --- xCAT-server/lib/xcat/plugins/dhcp.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index fb73800d4..2f870b7b4 100755 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -868,6 +868,14 @@ sub check_options return 1; } + # check to see if -n is listed with any other options which is not allowed + if ($::opt_n and ($::opt_a || $::opt_d || $::opt_q || $::opt_r || $::opt_l || $statements)) { + my $rsp = {}; + $rsp->{data}->[0] = "The -n option cannot be used with other options."; + xCAT::MsgUtils->message("E", $rsp, $callback, 1); + return 1; + } + unless (($req->{arg} and (@{$req->{arg}}>0)) or $req->{node}) { my $rsp = {};