add support in dsh context for useSSHonAIX attribute
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1649 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
d11bfe8ee8
commit
a9d04905a3
@ -6,6 +6,7 @@ use Socket;
|
||||
use xCAT::Utils;
|
||||
use xCAT::MsgUtils;
|
||||
use base xCAT::DSHContext;
|
||||
|
||||
# Define remote shell globals from xCAT
|
||||
|
||||
our $XCAT_RSH_CMD;
|
||||
@ -287,8 +288,10 @@ sub resolve_node
|
||||
get_xcat_remote_cmds
|
||||
|
||||
Using xCAT native commands, store the remote command settings for
|
||||
the remote shell and remote copy commands as defined in xCAT
|
||||
site.tab file.
|
||||
the remote shell and remote copy commands determined from the
|
||||
site.tab file useSSHonAIX attribute. If the attribute is set to yes or 1
|
||||
then we will setup and use ssh on AIX, otherwise we use rsh. On Linux,
|
||||
we always setup and use ssh.
|
||||
|
||||
Arguments:
|
||||
None
|
||||
@ -314,17 +317,22 @@ sub resolve_node
|
||||
#-------------------------------------------------------------------------------
|
||||
sub get_xcat_remote_cmds
|
||||
{
|
||||
$XCAT_RSH_CMD = "/usr/bin/ssh"; # default
|
||||
$XCAT_RCP_CMD = "/usr/bin/scp"; #default
|
||||
my @remote_shell = xCAT::Utils->get_site_attribute("rsh");
|
||||
if ($remote_shell[0])
|
||||
if (xCAT::Utils::isLinux)
|
||||
{
|
||||
$XCAT_RSH_CMD = $remote_shell[0];
|
||||
$XCAT_RSH_CMD = "/usr/bin/ssh"; # default
|
||||
$XCAT_RCP_CMD = "/usr/bin/scp"; #default
|
||||
}
|
||||
my @remote_copy = xCAT::Utils->get_site_attribute("rcp");
|
||||
if ($remote_copy[0])
|
||||
{
|
||||
$XCAT_RCP_CMD = $remote_copy[0];
|
||||
else
|
||||
{ # AIX
|
||||
$XCAT_RSH_CMD = "/bin/rsh"; # default
|
||||
$XCAT_RCP_CMD = "/bin/rcp"; #default
|
||||
my @usesshonaix = xCAT::Utils->get_site_attribute("useSSHonAIX");
|
||||
$usesshonaix[0] =~ tr/a-z/A-Z/; # convert to upper
|
||||
if (($usesshonaix[0] eq "1") || ($usesshonaix[0] eq "YES"))
|
||||
{ # use ssh/scp
|
||||
$XCAT_RSH_CMD = "/bin/ssh"; # default
|
||||
$XCAT_RCP_CMD = "/bin/scp"; #default
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user