defect 3414740 Merge aixremoteshell/remoteshell
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13545 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
1b336f15be
commit
69684fce04
@ -12,6 +12,12 @@
|
||||
login with no password. The default is /bin/rsh and
|
||||
/bin/rcp but can be overriden by setting the useSSHonAIX attribute in the
|
||||
site table to yes, in which case we will use ssh/scp.
|
||||
The aixremoteshell postscripts will be called from remoteshell postscript
|
||||
when on an AIX node. It will input a -d ( for do) flag, to indicate to run
|
||||
If the flag is not input, the routine will do nothing. This is to have only
|
||||
remoteshell in the postscripts table whether supporting AIX or Linux,
|
||||
and better support mixed clusters.
|
||||
|
||||
=cut
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -30,7 +36,7 @@ my $useSocketSSL=eval { require IO::Socket::SSL; };
|
||||
if ($useSocketSSL) {
|
||||
require IO::Socket::SSL;
|
||||
}
|
||||
|
||||
use Getopt::Long;
|
||||
my $rc = 0;
|
||||
|
||||
# Override from site table
|
||||
@ -42,7 +48,20 @@ my $enablesshbetweennodes = $ENV{'ENABLESSHBETWEENNODES'};
|
||||
my $msg;
|
||||
my $home;
|
||||
my $cmd;
|
||||
my $runscript;
|
||||
my $username = "root";
|
||||
Getopt::Long::Configure("bundling");
|
||||
Getopt::Long::Configure("pass_through");
|
||||
GetOptions(
|
||||
'd|do' => \$runscript
|
||||
);
|
||||
# the postscript only runs if called with -d flag from remoteshell
|
||||
unless ($runscript) {
|
||||
my $msg = "aixremoteshell called without -d flag, do nothing.";
|
||||
`logger -t xcat -p local4.err $msg`;
|
||||
exit 0;
|
||||
}
|
||||
|
||||
my @root = split ':', (`/bin/grep ^$username /etc/passwd 2>&1`);
|
||||
$home = $root[5];
|
||||
# root home directory must be root system
|
||||
|
@ -1,12 +1,16 @@
|
||||
#!/bin/sh
|
||||
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
#egan@us.ibm.com
|
||||
#(C)IBM Corp
|
||||
#
|
||||
# Linux or AIX
|
||||
# Linux or if AIX call aixremoteshell -d
|
||||
if [ "$(uname -s)" = "AIX" ]; then
|
||||
./aixremoteshell -d 2>&1
|
||||
logger -t xcat -p local4.info "Install: On AIX , remoteshell calling aixremoteshell -d "
|
||||
exit 0
|
||||
fi
|
||||
if [ -r /etc/ssh/sshd_config ]
|
||||
then
|
||||
logger -t xcat -p local4.info "Install: setup /etc/ssh/sshd_config"
|
||||
logger -t xcat -p local4.info "Install: setup /etc/ssh/sshd_config"
|
||||
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ORIG
|
||||
sed -i 's/^X11Forwarding .*$/X11Forwarding yes/' /etc/ssh/sshd_config
|
||||
sed -i 's/^KeyRegenerationInterval .*$/KeyRegenerationInterval 0/' /etc/ssh/sshd_config
|
||||
|
Loading…
Reference in New Issue
Block a user