The bash (for example) can be "login shell" or "common shell".
Login shell is the first instance of bash. This instance have no shell parents.
So it use /etc/profile (and probably .profile) and .bashrc files to init.
Common shell use only .bashrc file.
You can force bash to be login shell by -l option.
For ssh login with clish I use wrapper named "dish"
The dish do something like this:
# Include profile. The dish can be standalone.
test -r /etc/profile && . /etc/profile
# Include dish config file.
test -r /etc/dish && . /etc/dish
...
exec /usr/bin/clish "$@"
So I use /bin/dish as a default shell but not clish itself
2012/1/12 hitchcocknz <hitch...@gmail.com>:
It's strange.
I have tested the env variables now. It woks for me. And PATH works too.
The clish use /bin/sh as a default shell.
Additionally see the http://code.google.com/p/klish/wiki/shebang for
information about shebang settings.
Check the /bin/sh file. It can be a symbolic link for another shell
(dash for example in Debian), Another shell can use its own additional
config files like .bashrc for bash. Probably it can redefine PATH
within this config...
2012/1/13 hitchcocknz <hitch...@gmail.com>:
It's really strange. The clish doesn't change PATH itself. And the
script from ACTION inherits previous environment while my experiments.
I suppose ssh daemon set some default PATH but when it's a clish
nobody include .profile then. In case of /bin/sh (default shell) it
will include .profile etc.
2012/1/14 hitchcocknz <hitch...@gmail.com>: