Solved

Not a terminal

Posted on 2008-06-17
6
1,647 Views
Last Modified: 2012-05-05
Please see the error we are getting for the script
Not a terminal
stty: : Not a typewriter
stty: : Not a typewriter
^M^M    ^[2     ^[2     ^[2     ^[2     ^[2     ^[2     ^[2     ^[2     ^[2     ^[2     ^[2     ^[2     ^[2     ^[2     ^[2     ^[2     ^[2     ^[2     ^[2     ^[2^M
                                                                 ^M/usr/lib/dld.sl: Can't open shared library: /project2/OES/634/src/oes/src/lib/libncro2.sl
/usr/lib/dld.sl: No such file or directory
/usr1/local/bin/nsrpre_express_backup[9]: 28180 Abort(coredump)

How can we get rid of the "Not a Terminal"?
1. We are running a cronjob script
30 00 * * * /usr1/local/bin/stop_start.sh > /tmp/stop_start_.log 2>&1
2. The stop_start.sh contains
#!/bin/ksh
#
# Procedure to stop/start instance on the weekends
#
/home/user1/.profile
#
/usr1/local/bin/nsrpre_express_backup
sleep 300
/usr1/local/bin/nsrpost_express_backup

3. /home/user1/.profile contains
# @(#)B.11.11_LR

# Default user .profile file (/usr/bin/sh initialization).

# only execute if interactive session

# Set up the terminal:
        if [ "$TERM" = "" ]
        then
                eval ` tset -s -Q -m ':?hp' `
        else
                eval ` tset -s -Q `
        fi
        stty erase "^H" kill "^U" intr "^C" eof "^D" susp "^Z"
        stty hupcl ixon ixoff
        tabs
export ORACLE_BASE=/usr1/oes
export ORACLE_HOME=$ORACLE_BASE/6.3.4.0
export OLAP_HOME=$ORACLE_HOME/olap
/home/oesdba/admin/scripts/stop_task_processors
sleep 600
# Stop the first instance of Express
/usr1/oes/6.3.4.0/olap/bin/oesmgr stop immediate ExpSrv634
sleep 120
# Stop the second instance of Express
/usr1/oes/6.3.4.0/olap/bin/oesmgr stop immediate ExpSrv634_1
# Allow 2 minutes for both the instances to stop.

Please advise









0
Comment
Question by:oo07
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 23

Expert Comment

by:David
ID: 21802003
This is caused by the 'stty' settings you have in your user profile (either ~/.profile or /etc/profile).  Try commenting them out and then login again.

Some people put stty commands in their startup scripts (.profile for ksh). Ideally, they should test to see if the shell is interactive.

0
 
LVL 8

Accepted Solution

by:
shanikawm earned 500 total points
ID: 21802057
0
 

Author Comment

by:oo07
ID: 21803372
we need the .profile to set the environment
0
 
LVL 23

Expert Comment

by:David
ID: 21803442
Perhaps if you tried adding to your .profile the line ENV=~/.shrc  where .shrc contains your aliases and stty settings....
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 21804054
you may add an if statement in your .profile that checks your TERM env variable before calling stty
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question