From c619538333047b807326e5da274ae6d019fb15e2 Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Wed, 2 Nov 2016 16:55:05 -0400 Subject: [PATCH] Handle invalid options for makentp command --- xCAT-server/lib/xcat/plugins/makentp.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/makentp.pm b/xCAT-server/lib/xcat/plugins/makentp.pm index d8801b431..f2e784751 100755 --- a/xCAT-server/lib/xcat/plugins/makentp.pm +++ b/xCAT-server/lib/xcat/plugins/makentp.pm @@ -110,6 +110,7 @@ sub parse_args { # Responds with usage statement local *usage = sub { my $usage_string = xCAT::Usage->getUsage($cmd); + send_msg($request, 0, " $usage_string"); return ([ $_[0], $usage_string ]); }; @@ -124,6 +125,7 @@ sub parse_args { @ARGV = @$args; $Getopt::Long::ignorecase = 0; Getopt::Long::Configure("bundling"); + Getopt::Long::Configure("no_pass_through"); # Process command-line flags if (!GetOptions(\%opt, @@ -288,7 +290,7 @@ sub process_request { } if ($verbose) { - send_msg(\%request, 0, " ...changing the ntpp configuration file /etc/ntp.conf.\n ntp servers are: $ntp_servers"); + send_msg(\%request, 0, " ...changing the ntp configuration file /etc/ntp.conf.\n ntp servers are: $ntp_servers"); } # create ntp server config file