From 2362cb060eee65eaa078fbc5cf1e66d67bdcf594 Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 10 Oct 2011 16:45:13 +0000 Subject: [PATCH] warn do not use xdsh -K fro Mellanox switch git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10730 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/xdsh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xCAT-client/bin/xdsh b/xCAT-client/bin/xdsh index 4f909c0a8..4403b98de 100644 --- a/xCAT-client/bin/xdsh +++ b/xCAT-client/bin/xdsh @@ -340,12 +340,21 @@ sub parse_args_xdsh } $ENV{DSH_TO_USERID} = $to_userid; + # if devicetype=Mellanox, xdsh does not setup ssh, rspconfig does + my $devicepath = $options{'devicetype'}; + $devicepath =~ s/::/\//g; + if (($options{'ssh-setup'}) && ($devicepath =~ /Mellanox/i)) { + my $msg = + "You do not use xdsh -K to setup the Mellanox switch ssh keys. Use rspconfig. See man page for rspconfig option sshcfg={enable|disable}."; + xCAT::MsgUtils->message("E", $msg); + exit 2; + } # only allow -K with -l if --devicetype defined if ( (($options{'user'}) && ($options{'ssh-setup'})) && (!($options{'devicetype'}))) { my $msg = - "The -K and -l flag may only be used if --devicetype is specified\n."; + "The -K and -l flag may only be used if --devicetype is specified."; xCAT::MsgUtils->message("E", $msg); exit 2; }