- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: stty::Not a typewriter error message in rc.log
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
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
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-27-2006 03:00 AM
тАО10-27-2006 03:00 AM
When I run a shell script which does start/stop of an application in /sbin/init.d I get this message. Does anyone out there know a fix?
The script basically does one command
case $1 in
start)
/usr/bin/su - user -c '/opt/bin/app start'
;;
stop)/usr/bin/su - user -c '/opt/bin/app stop'
;;
esac
Thanks
rajim
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2006 03:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2006 03:07 AM
тАО10-27-2006 03:07 AM
Re: stty::Not a typewriter error message in rc.log
By using the 'su - username' you are causing the user's profile to be sourced (read).
This has the advantage of adding the profile's variables to your environment just like logging into to the server, but has the disadvantage of treating the process as an interactive one. Since no terminal is associated with the process, you get the "not a typewriter" error.
If you look at your profile you will see unconditional calls to 'stty' and 'tset'. These commands are interactive with a terminal.
You can eliminate this problem by revising your profile to *conditionally* execute 'stty' and 'tset' commands by adding:
...
if [ -t 0 ]; then
...
If the test is true, the process is an interactive one; that is, a terminal is associated with it.
Another way to circumvent this problem is *not* to use 'su -' but rather only 'su'. In this case, your .profile is not sourced. In this case, however, you will have to provide ALL environmental variables you may need in your script or by sourcing (reading) a file containing them.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2006 03:12 AM
тАО10-27-2006 03:12 AM
Re: stty::Not a typewriter error message in rc.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2006 03:12 AM
тАО10-27-2006 03:12 AM
Re: stty::Not a typewriter error message in rc.log
if [[ -t 0 ]]
then
eval ` tset -s -Q `
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
stty susp ""
stty dsusp ""
tabs
fi
Pete
Pete