We are more users using the oracle account, and people want to include theyr own files in .bash_profile. Like this:
while [ "$LOGNAME" = "oracle" -o -z "$LOGNAME" ]; do
echo -n "LOGNAME is '$LOGNAME' \(no sens\), who are you? " >/dev/stderr
read ln
export LOGNAME=$ln
done
This works well when logging in to the system, ssh, su - and in crontab. Now I have to run some scripts from roots crontab like this. su - oracle -c "command" 1>error.1.log 2>error.2.log
And all I get in this log is, over end over and over.
LOGNAME is '' (no sense), who are you?
Some suggestions?
Thanks in advance.