Hi Informix Gurus,
I am trying to operationalize the "ontape" backup by putting this inside a script wherein there is a menu with options and once the option for ontape was selected the backup will run wittout giving our operators access to command prompt.
I have this user created for operators (which is opsuser) that will switch user to the informix account in my script and run the ontape backup command.
from the menu script:
$SUDO su - informix -c "$BIN/informix.sh"
~~~~~~~~~~~~~~
informix.sh contains:
#
setenv TERM vt100
/informix/DEV/bin/ontape -s -L 0
~~~~~~~~~~~~~~~~~~~~~~
When i am running the script as the operator user, the script somehow bypasses the setenv command.
~~~~~~~~~~~~~~~~~~~~~~
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the U.S. Government is subject to
restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
Technical Data and Computer Software clause in DFARS 252.227-7013.
Hewlett-Packard Company
3000 Hanover Street
Palo Alto, CA 94304 U.S.A.
Rights for non-DOD U.S. Government Departments and Agencies are as set
forth in FAR 52.227-19(c)(1,2).
TERM = (hp)
0A/home/isodops/admin/backup/informix.sh[3]: setenv: not found
~~~~~~~~~~~~~~~~~~~~~~~~
At this point in the program i am already the user informix but unable to set the TERM variable which is denying me to execute the ontape command.
With access to the command prompt I am able to set the TERM variable successfully. What seems to be wrong in here then?
Is there a limitation with the usage of the ontape command that its not possible to incorporate it in a script and is really done manually?