[comp.unix.aix] bsh -o from the cron, but from where?

benson@odi.com (Benson I. Margulies) (02/03/91)

The root on my 3002 system gets periodic mail from cron
saying that some job got an error by invoking bsh with the
-o argument. But no crontabs contain the string "bsh -o",
and I can't find anything else  that does, either.

Has anyone else sorted this out?


-- 
Benson I. Margulies

mtimm@watserv1.waterloo.edu (Martin Timmerman) (02/04/91)

In article <1991Feb3.155320.14616@odi.com> benson@odi.com (Benson I. Margulies) writes:
>The root on my 3002 system gets periodic mail from cron
>saying that some job got an error by invoking bsh with the
>-o argument. But no crontabs contain the string "bsh -o",
>and I can't find anything else  that does, either.
>
>Has anyone else sorted this out?
>
I had this problem also.  root starts up with the ksh and the .profile
file likely has a set -o vi or set -o emacs command in it.
I changed the .profile to do the set -o vi only if the shell was interactive.

Martin Timmerman, University of Waterloo

robin@batcomp.austin.ibm.com (Robin D. Wilson) (02/06/91)

In article <1991Feb3.155320.14616@odi.com> benson@odi.com (Benson I. Margulies) writes:
>The root on my 3002 system gets periodic mail from cron
>saying that some job got an error by invoking bsh with the
>-o argument. But no crontabs contain the string "bsh -o",
>and I can't find anything else  that does, either.
>
>Has anyone else sorted this out?

Does your "/.profile" have "set -o vi" in it?  If it does, this should be 
removed to a /.kshrc (or some other file), and your .profile should be set
up with the following entries:

ENV=/.kshrc  # Or whatever filename you decided on
export ENV

This entry will do nothing (nothing useful that is) when bourne shell is 
started by cron (/bin/bsh), but when you start a ksh process it will know to
use the "ENV" variable to find the korn shell startup file (/.kshrc).  Since
bourne shell doesn't use "set -o vi" (or and of the "set -o" stuff used by
ksh) it will always return an error when running a profile that has this in
it.  You should note, that /bin/bsh is the shell of choice for cron, and it
will use the bourne shell, so if your environment files contain things that 
bourne shell doesn't do, they will fail.


-- 
+-----------------------------------------------------------------------------+
|The views expressed herein, are the sole responsibility of the typist at hand|
+-----------------------------------------------------------------------------+
|UUCP:     robin%aixserv@uunet.uu.net                                         |
|USNail:   701 Canyon Bend Dr.                                                |
|          Pflugerville, TX  78660                                            |
|          Home: (512)251-6889      Work: (512)823-3015                       |
+-----------------------------------------------------------------------------+