Subject: Re: CVS commit: basesrc/bin/ksh
To: Joerg Klemenz <email@example.com>
From: Roland Dowdeswell <firstname.lastname@example.org>
Date: 09/30/2002 02:38:45
On 1033321233 seconds since the Beginning of the UNIX epoch
Joerg Klemenz wrote:
>To make things even worse, there's no way that I know of to load
>defaults for non-interactive non-logged-in shells. The retarded $ENV
>construct assumes that the user is logged in when he starts a
>But many a script is run from cron or at and there is no way to force
>the loading of any defaults or even a PATH.
If you're writing scripts then you should generally call things
out by their absolute path, or set the PATH yourself at the top of
the script. This isn't all that hard and it prevents the scripts
from becoming broken if the environment gets changed. If you want
to get these defaults from a standard location you can simply .
a file at the top of your scripts. The .profile/$ENV system was
defined for interactive shells and its behaviour is pretty much
specified by POSIX etc. It is not difficult to work around the
deficiencies in it, in a portable way. And it is not possible to
change the behaviour of ksh(1) in regards to sourcing the interactive
startup scripts and maintain portability with other systems.
Including the last release of our own system.
Although, I'm not sure what this has to do with root's default
shell which seems to me to be as much a matter of user preference
as anything---and not generally the most important preference in
general system use, as you can just ``su -m'' or ssh ``toor@''
rather than ``ssh root@''. (Keep in mind that if you set up
authorized_keys .k5login for root, then they also work for toor,
as they share a home directory.)
Roland Dowdeswell http://www.Imrryr.ORG/~elric/