- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ttytype: couldn't open /dev/tty for reading |...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2013 08:37 PM
10-30-2013 08:37 PM
Re: ttytype: couldn't open /dev/tty for reading | stty: : Not a typewriter
>I have edited and added the requested lines in /etc/profile and .profile.
>echo "In ~/.profile" 1>&2
>if [ ! "$VUE" ] && tty -s; then
>echo "In /etc/profile" 1>&2
>if tty -s
Leave out that "if". I only had that to show you where to put that echo. Move the echo up in both files.
>su - oraprod -c 'sh /u01/proddb/9.2.0/appsutil/scripts/PROD_gfhdbp/addlnctl.sh s top prod'
This will cause execution of the profile files (~oraprod/.profile) from your crontab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2013 07:17 AM
10-31-2013 07:17 AM
Re: ttytype: couldn't open /dev/tty for reading | stty: : Not a typewriter
Hi Bill,
It looks I have confused you with my uploaded O/P. Here I am trying to explain you below what I actually did
# diff /home/oraprod/.profile /usr/newconfig/etc/skel/.profile
27,29d26
<
< #. /u01/proddb/9.2.0/PROD_gfhdbp.env
< . /home/oraprod/9i_profile
The user used to run the crontab is "oraprod" and I have edited its .profile as follows:
Original .profile of oraprod is in /home/oraprod/.profile
# more /home/oraprod/.profile
# @(#)B11.23_LR
# Default user .profile file (/usr/bin/sh initialization).
# 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"
stty hupcl ixon ixoff
tabs
# Set up the search paths:
PATH=$PATH:.
# Set up the shell environment:
set -u
trap "echo 'logout'" 0
...skipping...
# @(#)B11.23_LR
# Default user .profile file (/usr/bin/sh initialization).
# 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"
stty hupcl ixon ixoff
tabs
# Set up the search paths:
PATH=$PATH:.
# Set up the shell environment:
set -u
trap "echo 'logout'" 0
# Set up the shell variables:
EDITOR=vi
export EDITOR
#. /u01/proddb/9.2.0/PROD_gfhdbp.env
. /home/oraprod/9i_profile
Edited .profile in /home/oraprod/.profile as per your suggestion below:
# more /home/oraprod/.profile
echo "In $HOME/.profile"
#. /u01/proddb/9.2.0/PROD_gfhdbp.env
. /home/oraprod/9i_profile
Please let me know if it looks fine.
Hi Dennis,
As per your suggestion I have edited the /etc/profile and .profile as well.
Many thanks to both of you for the support.
Regards,
Syed
Syed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2013 11:01 AM
10-31-2013 11:01 AM
Re: ttytype: couldn't open /dev/tty for reading | stty: : Not a typewriter
>Please let me know if it looks fine.
I don't see the changes??
What's in /home/oraprod/9i_profile?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2013 12:05 AM - edited 12-02-2013 12:57 AM
12-01-2013 12:05 AM - edited 12-02-2013 12:57 AM
Re: ttytype: couldn't open /dev/tty for reading | stty: : Not a typewriter
Hello Denis,
Sorry for the late response as I was on a long vacation so couldn't work on this issue.
As requested please find O/p
#more /home/oraprod/9i_profile ORACLE_HOME=/u01/proddb/9.2.0 export ORACLE_HOME
ORACLE_SID=PROD export ORACLE_SID
PATH=$PATH:$ORACLE_HOME/bin; export PATH
PATH=$PATH:$ORACLE_HOME/OPatch; export PATH
LD_LIBRARY_PATH=/u01/proddb/9.2.0/lib:/usr/dt/lib:/usr/openwin/lib:/u01/proddb/9.2.0/ctx/lib; export LD_LIBRARY_PATH
TNS_ADMIN=/u01/proddb/9.2.0/network/admin/PROD_gfhdbp export TNS_ADMIN
I have reverted my /etc/profile and .profiel to teh original as I was getting soem other error after editing .
Please help.
Attaching /etc/profile and .profile also
Please help to fix this issue
Regards
Syed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2013 12:59 AM - edited 12-02-2013 01:01 AM
12-02-2013 12:59 AM - edited 12-02-2013 01:01 AM
Re: ttytype: couldn't open /dev/tty for reading | stty: : Not a typewriter
>#more /home/oraprod/9i_profile
>ORACLE_HOME=/u01/proddb/9.2.0 export ORACLE_HOME
>ORACLE_SID=PROD export ORACLE_SID
>TNS_ADMIN=/u01/proddb/9.2.0/network/admin/PROD_gfhdbp export TNS_ADMIN
These three lines are missing the semicolon before the export keyword.
If you are using a real shell, you should switch to simpler ksh or POSIX shell export syntax:
export ORACLE_HOME=/u01/proddb/9.2.0
>In /etc/profile
/etc/profile[54]: Syntax error: `if' is not matched.
This is the junk that I mentioned in message #11 to remove:
if tty -s
>In ~/.profile
.profile[53]: Syntax error: `then' is not matched
Same here:
if [ ! "$VUE" ] && tty -s; then
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2013 01:15 AM
12-02-2013 01:15 AM
Re: ttytype: couldn't open /dev/tty for reading | stty: : Not a typewriter
Hi,
Now after editing "/home/oraprod/9i_profile" it looks as below:
# more /home/oraprod/9i_profile
ORACLE_HOME=/u01/proddb/9.2.0;
export ORACLE_HOME
ORACLE_SID=PROD;
export ORACLE_SID
PATH=$PATH:$ORACLE_HOME/bin; export PATH
PATH=$PATH:$ORACLE_HOME/OPatch; export PATH
LD_LIBRARY_PATH=/u01/proddb/9.2.0/lib:/usr/dt/lib:/usr/openwin/lib:/u01/proddb/9.2.0/ctx/lib;
export LD_LIBRARY_PATH
TNS_ADMIN=/u01/proddb/9.2.0/network/admin/PROD_gfhdbp;
export TNS_ADMIN
Then after that I did
export ORACLE_HOME=/u01/proddb/9.2.0
Is it fine now? As mentioned in my last post I have reverted back my /etc/profile and .profile as old and attached for your reference.
Regards,
Syed
Syed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2013 01:33 AM - edited 12-02-2013 01:35 AM
12-02-2013 01:33 AM - edited 12-02-2013 01:35 AM
Re: ttytype: couldn't open /dev/tty for reading | stty: : Not a typewriter
>Is it fine now?
Well, if you have two lines, you don't need that semicolon.
And if you don't get those syntax errors, you should be fine.
You can check for syntax errors by:
ksh -n file
>I have reverted back my /etc/profile and .profile as old
So you don't have any changes that Bill and I have mentioned that use "if tty -s; then" to condition the tty setting blocks?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2013 01:41 AM
12-02-2013 01:41 AM
Re: ttytype: couldn't open /dev/tty for reading | stty: : Not a typewriter
Hi,
>Yes it is in 2 lines
> After reverting to old scripts without semicolon i run teh commands as
#ksh -n /home/oraprod/9i_profile
It came to # prompt without any error.
Now how can we resolve this issue?
Thanks for all your support and really apprecaite it.
Regards
Syed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2013 02:17 AM
12-02-2013 02:17 AM
Re: ttytype: couldn't open /dev/tty for reading | stty: : Not a typewriter
>Now how can we resolve this issue?
What issue? Your original one? Bill and I already told you how to do it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2013 02:32 AM
12-02-2013 02:32 AM
Re: ttytype: couldn't open /dev/tty for reading | stty: : Not a typewriter
Issue still persist
Regards
Syed