oo07
asked on
Not a terminal
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/li bncro2.sl
/usr/lib/dld.sl: No such file or directory
/usr1/local/bin/nsrpre_exp ress_backu p[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_exp ress_backu p
sleep 300
/usr1/local/bin/nsrpost_ex press_back up
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/ola p
/home/oesdba/admin/scripts /stop_task _processor s
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
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/
/usr/lib/dld.sl: No such file or directory
/usr1/local/bin/nsrpre_exp
How can we get rid of the "Not a Terminal"?
1. We are running a cronjob script
30 00 * * * /usr1/local/bin/stop_start
2. The stop_start.sh contains
#!/bin/ksh
#
# Procedure to stop/start instance on the weekends
#
/home/user1/.profile
#
/usr1/local/bin/nsrpre_exp
sleep 300
/usr1/local/bin/nsrpost_ex
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
export OLAP_HOME=$ORACLE_HOME/ola
/home/oesdba/admin/scripts
sleep 600
# Stop the first instance of Express
/usr1/oes/6.3.4.0/olap/bin
sleep 120
# Stop the second instance of Express
/usr1/oes/6.3.4.0/olap/bin
# Allow 2 minutes for both the instances to stop.
Please advise
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
we need the .profile to set the environment
Perhaps if you tried adding to your .profile the line ENV=~/.shrc where .shrc contains your aliases and stty settings....
you may add an if statement in your .profile that checks your TERM env variable before calling stty
Some people put stty commands in their startup scripts (.profile for ksh). Ideally, they should test to see if the shell is interactive.