ADSM-L

Re: problem with a su script

2003-04-02 08:51:35
Subject: Re: problem with a su script
From: Richard Sims <rbs AT BU DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 2 Apr 2003 08:51:12 -0500
> su - oracle /home/oracle/scripts/backup/db_backup.sh
>
> this script handles all the processing of the database and calls a dsmc
> archive command. on 97% of the servers it works fine. however, on just a
> few of them... that dont appear to be any different, the script
> immediately dies with a return code of 1 (no, its not permissions)....

Some things I can think of:  With no prohibitions specified in your
invocation, the su command is going to establish environment and run
through the "oracle" username's login shell, which implies invoking its
.login and .cshrc, etc.  On the problem systems, those files may contain
problematic elements.  Also, you are depending upon the first line of the
db_backup.sh to determine what shell or module processes the contents of
that shell script - and, again, possible reprocessing .cshrc, etc.  It
may be that whatever is named on that first "#!..." line may not exist
or has permissions problems, etc.

Obviously, you can readily pursue debugging by logging on to that system
as root and invoke 'su - oracle ...' on a variety of debugging scripts
with escalating diagnostics as necessary.

  Richard Sims, BU

<Prev in Thread] Current Thread [Next in Thread>