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'}) {