From 3642da1c8e418faf684887a462ea7b89db594e43 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 11 Jun 2008 18:24:58 +0000 Subject: [PATCH] Add export of RSH and RCP. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1623 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Postage.pm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/perl-xCAT/xCAT/Postage.pm b/perl-xCAT/xCAT/Postage.pm index 4aa0f2289..c81b84c7a 100644 --- a/perl-xCAT/xCAT/Postage.pm +++ b/perl-xCAT/xCAT/Postage.pm @@ -132,6 +132,29 @@ sub makescript { if ($et and defined($et->{value})) { $ntpservers = $et->{value}; + } + + # read the remoteshell attributes, if they exist + # default to rsh on AIX and ssh on Linux + my $rsh; + my $rcp; + if (xCAT::Utils->isLinux()) { + $rsh = "/usr/bin/ssh"; + $rcp = "/usr/bin/scp"; + } else { #AIX + $rsh = "/bin/rsh"; + $rcp = "/bin/rcp"; + } + # check for admin input + (my $et) = $sitetab->getAttribs({key=>"rsh"},'value'); + if ($et and defined($et->{value})) { + $rsh = $et->{value}; + + } + (my $et) = $sitetab->getAttribs({key=>"rcp"},'value'); + if ($et and defined($et->{value})) { + $rcp = $et->{value}; + } # set env variable $SITEMASTER for Management Node push @scriptd, "SITEMASTER=".$sitemaster."\n"; @@ -149,6 +172,12 @@ sub makescript { push @scriptd, "export NTPSERVERS\n"; } + # export remote shell + push @scriptd, "RSH=".$rsh."\n"; + push @scriptd, "export RSH\n"; + push @scriptd, "RCP=".$rcp."\n"; + push @scriptd, "export RCP\n"; + my $et = $typetab->getNodeAttribs($node,['os','arch','profile']); if ($^O =~ /^linux/i) { unless ($et and $et->{'os'} and $et->{'arch'}) {