[Beowulf] rsh don't see the real variables

Gustavo Gobi Martinelli gustavo at martinelli.etc.br
Sat Oct 9 18:39:44 PDT 2004


Robert,

> Use ssh, and look into the environment commands.  rsh has many flaws,
> one of which is a failure to pass environment variables at all sanely
> from the calling host.  So this is one way to proceed.

the rsh doesn't pass environment variables, it gets the variables on the host.
And I have to know, where I can declare this variables because they are
different of the .bash_profile and /etc/profile.

>
> Also note (from man bash):
>
>        When bash is invoked as an interactive login shell, or as a
> non-inter-
>        active shell with the --login option, it first reads and executes
> com-
>        mands from the file /etc/profile, if that file exists.  After
> reading
>        that file, it looks for ~/.bash_profile, ~/.bash_login, and
> ~/.profile,
>        in that order, and reads and executes commands from the first one
> that
>        exists and is readable.  The --noprofile option may be used when
> the
>        shell is started to inhibit this behavior.
>
> In other words, there is a difference between the behavior of an
> interactive shell (what you get when you execute rsh hostname to log in)
> and a non-interactive shell -- they actually read and execute different
> .??* files in a different order.

I will study about it.

>  In fact, you can control the order to some extent with the call syntax.

The PVM executes its codes. I don't have any control about it. So I can't make a
different sintax.

> Assuming that you're using bash, you
> might read the man page carefully and experiment -- if you put the
> requisite environment variable definitions in the right place you should
> still be able to have them initialized even over rsh,

I will create the other files and I will test it.

> as long as you
> don't have to pass them via the remote shell itself.

I don't have to pass variables on the rsh session, It executes remote codes
using the variables on that host.

> If you do, you'll
> NEED to look into ssh in more detail.

I will see it too.

> HTH,
>    rgb

Thank´s for the help.



More information about the Beowulf mailing list