From 87251d1ac0ae2c5c135c94eb6cb2cd67666cae33 Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 3 Apr 2009 18:06:04 +0000 Subject: [PATCH] add check the -K and -l option are not supported together git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3085 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/xdsh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT-client/bin/xdsh b/xCAT-client/bin/xdsh index 7dc730390..6534a566a 100644 --- a/xCAT-client/bin/xdsh +++ b/xCAT-client/bin/xdsh @@ -260,15 +260,15 @@ sub parse_args_xdsh $to_userid = $current_userid; } $ENV{DSH_TO_USERID} = $to_userid; + # cannot use -K and -l options together + if (($options{'ssh-setup'}) && ($options{'user'})) { + my $msg = "The -K option and the -l option are not supported together.\n"; + xCAT::MsgUtils->message("E", $msg); + exit 2; + } if ($options{'ssh-setup'}) # if going to setup ssh keys { - if ($to_userid ne $current_userid) { #error - my $msg = "For -K option, the -l option is not supported unless same id as running the command.\n"; - xCAT::MsgUtils->message("E", $msg); - exit 2; - - } # prompt for the password for the userid on the node that will be setup my $userpw;