[comp.unix.aix] Annoying mail messages

mcover@magnus.acs.ohio-state.edu (Mark Coverdill) (05/20/91)

   Since the standard setup for the RS 6000 is to put root in
the ksh, I have utilized some of its features and have setup
aliases in the .profile file.

   This causes root to get annoying mail messages from cron
because cron reads the .profile when running the root file
in /usr/spool/crontabs but it runs in the Bourne shell?!

   The mail message is from the cron daemon and basically says
-bsh: alias: not found.

   The question is how can I get cron to run in the ksh or
alternatively get cron to not read the .profile file in the
root directory?  I have alreadly tried different incarnations
of putting #!/bin/ksh at the top of the root file for cron
but that has not worked to date.

   I guess I could just remove the alias command but then that's
no fun because I like the root environment the way it is.
-- 
Mark Coverdill                                  The Ohio State University
Internet: mcover@magnus.acs.ohio-state.edu             Columbus, Ohio

jona@iscp.Bellcore.COM (Jon Alperin) (05/20/91)

In article <1991May20.164112.11050@magnus.acs.ohio-state.edu>, mcover@magnus.acs.ohio-state.edu (Mark Coverdill) writes:
|> 
|>    Since the standard setup for the RS 6000 is to put root in
|> the ksh, I have utilized some of its features and have setup
|> aliases in the .profile file.
|> 
|>    The question is how can I get cron to run in the ksh or
|> alternatively get cron to not read the .profile file in the
|> root directory? 

	This is fixed in 3.1.5 - get the latest release from 
your SE or defect support.

|> -- 
|> Mark Coverdill                                  The Ohio State University
|> Internet: mcover@magnus.acs.ohio-state.edu             Columbus, Ohio

-- 
Jon Alperin
Bell Communications Research

---> Internet: jona@iscp.bellcore.com
---> Voicenet: (908) 699-8674
---> UUNET: uunet!bcr!jona

* All opinions and stupid questions are my own *

griefer@adg2.almaden.ibm.com (05/21/91)

I made my original .profile .kprofile and entered the following as my
.profile:

if [ $0 != '-bsh' ]
then
	. ./.kprofile
fi

Hope this helps.

-- 
Opinions are strictly my own,
Allan D. Griefer,       IBM Almaden Research Center, San Jose, CA
BITNET: GRIEFER at ALMADEN              Internet: griefer@ibm.com
UUCP: ...!uunet!ibmarc!griefer          mcimail: 398-8024

sanders@sanders.austin.ibm.com (Tony Sanders) (05/21/91)

mcover@magnus.acs.ohio-state.edu (Mark Coverdill) writes:
>    I guess I could just remove the alias command but then that's
> no fun because I like the root environment the way it is.
Put them in .kshrc and set the ENV environment variable to point
to it:  ENV=$HOME/.kshrc ; export ENV

bsh won't bother to read that file.

-- sanders@cactus.org
Better living through tolerance, education, and empathy.
I am not a representative of any company, I speak only for myself.