Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2010
    Posts
    3

    Unanswered: informix user: Unable to set the terminal to vt100

    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?

  2. #2
    Join Date
    Jul 2009
    Posts
    37
    Maybe it's korn shell based?

    In which case,

    export TERM=vt100

    rather than

    setenv TERM vt100

  3. #3
    Join Date
    Oct 2010
    Posts
    3
    default shell of informix is csh

  4. #4
    Join Date
    Oct 2010
    Posts
    3
    By the way may OS is HP-UX 11.11.

    Here are some of things I've done to set the terminal to vt100

    1. added a "set TERM=vt100" to /etc/profile
    2. added a "setenv TERM vt100" to .cshrc file of the informix user
    3. added a "set TERM=vt100" to .profile of the informix user.

    Still to no avail.

  5. #5
    Join Date
    Jul 2009
    Posts
    37
    You might also need to set the TERMINFO environment variable - I think the TERMINFO file is somewhere under the informix directory, not sure where, maybe /etc/

  6. #6
    Join Date
    Oct 2010
    Posts
    2
    Thank you for your nice post.I really enjoy to visit your post.I have visited lot of post yours is the best one.Thanks for sharing keep posting .


    outlook add ins

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •