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
Forums
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
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
01-12-2010 08:09 AM
01-12-2010 08:09 AM
SAM
i am facing a very dificult problem..i want to access the kernel configuration from sam,but when i when i go to sam and i try to access the kernel configuration option, it says,.....The environment variable TERM is not set or set to an unsupported terminal Exiting.
Press
cna some one please help me ?.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2010 08:20 AM
01-12-2010 08:20 AM
Re: SAM
How are you connecting to the server to run sam?
# echo $TERM
# sam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2010 12:24 PM
01-12-2010 12:24 PM
Re: SAM
export TERM=vt100
# pick a terminal type that works for you.
sam
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2010 08:02 PM
01-12-2010 08:02 PM
Re: SAM
To fix this problem, you must remove the defective code that looks like this:
# Be sure that VUE does not invoke tty commands
if [ ! "$VUE" ]; then
# 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
echo
echo "Value of TERM has been set to \"$TERM\". "
export TERM
EDITOR=vi
export EDITOR
fi # if !VUE
= = = = = = = = = = = =
And replace that code with:
# Bypass interactive-only code
tty â s
RTN=$?
if [ $RTN â eq 0 ]
then
# ID the terminal
eval $(ttytype â s)
# In case we are on a GSP/MP that blocks ttytype,
# use resize to query the LINES and COLUMNS
LINES=${LINES:-â â }
[ â $LINESâ = â â ] && eval $(resize)
# Set stty and tabs
stty erase "^H" kill "^U" intr "^C" eof "^D" -parity ixoff
stty susp \^Z dsusp \^Y
tabs
# Turn off the softkey labels 'cause they burn
# terminal screens and are annoying when editing
# or watching commands and data.
# (no effect for non-softkey terminals)
# Also send an sgr0 (end enhancements) in case it is ON
echo "$(tput rmln)$(tput sgr0)\c"
# Set user's shell to always timeout so forgotten logins will go away
# Change TMOUT to readonly to remind users how important this is.
# For development/deployment, this can be left as a writable variable
# that will require changing at each login..again, to remind users
# that leaving a session open is a security risk.
# To avoid a shell error from TMOUT set to readonly, check using the
# shell readonly builtin for a list of readonly variables and
# skip setting TMOUT if it is already readonly.
STDTMOUT=6000
if [ $(readonly | grep -c TMOUT) -eq 0 ]
then
export TMOUT=${TMOUT:-$STDTMOUT} # undefined
[ $TMOUT = 0 ] && export TMOUT=$STDTMOUT # defined as zero, set to $STDTMOUT
fi
# Set HISTFILE and HISTSIZE
export HISTFILE=${HISTFILE:-$HOME/.sh_history} # if not set already
export HISTSIZE=5000 # history file size
# Set PS1 (customize as needed)
# PS1=â ${PWD##*/} $â (this shows current directory)
[ $(id â u) â eq 0 ] && PS1=â # â || PS1=â $ â
# Clear any extra input lines that may be buffered
while :
do
ANS=$(line -t 1)
ERR=$?
[ $ERR -ne 0 ] && break
done
fi
= = = = = = = = = = = =
They key to your specific problem is the ttytype -s command. It will automatically figure out your terminal and set TERM, LINES, COLUMNS and ERASE. The rest of the code handles many future problems you may see with default profiles. Be sure to check /etc/profile as well as .profile in all user $HOME directories.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2010 08:05 PM
01-12-2010 08:05 PM
Re: SAM
# Bypass interactive-only code
tty â s
RTN=$?
if [ $RTN â eq 0 ]
then
# ID the terminal
eval $(ttytype â s)
# In case we are on a GSP/MP that blocks ttytype,
# use resize to query the LINES and COLUMNS
LINES=${LINES:-â â }
[ â $LINESâ = â â ] && eval $(resize)
# Set stty and tabs
stty erase "^H" kill "^U" intr "^C" eof "^D" -parity ixoff
stty susp \^Z dsusp \^Y
tabs
# Turn off the softkey labels 'cause they burn
# terminal screens and are annoying when editing
# or watching commands and data.
# (no effect for non-softkey terminals)
# Also send an sgr0 (end enhancements) in case it is ON
echo "$(tput rmln)$(tput sgr0)\c"
# Set user's shell to always timeout so forgotten logins will go away
# Change TMOUT to readonly to remind users how important this is.
# For development/deployment, this can be left as a writable variable
# that will require changing at each login..again, to remind users
# that leaving a session open is a security risk.
# To avoid a shell error from TMOUT set to readonly, check using the
# shell readonly builtin for a list of readonly variables and
# skip setting TMOUT if it is already readonly.
STDTMOUT=6000
if [ $(readonly | grep -c TMOUT) -eq 0 ]
then
export TMOUT=${TMOUT:-$STDTMOUT} # undefined
[ $TMOUT = 0 ] && export TMOUT=$STDTMOUT # defined as zero, set to $STDTMOUT
fi
# Set HISTFILE and HISTSIZE
export HISTFILE=${HISTFILE:-$HOME/.sh_history} # if not set already
export HISTSIZE=5000 # history file size
# Set PS1 (customize as needed)
# PS1=â ${PWD##*/} $â (this shows current directory)
[ $(id â u) â eq 0 ] && PS1=â # â || PS1=â $ â
# Clear any extra input lines that may be buffered
while :
do
ANS=$(line -t 1)
ERR=$?
[ $ERR -ne 0 ] && break
done
fi
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2010 08:08 PM
01-12-2010 08:08 PM
Re: SAM
# Bypass interactive-only code
tty -s
RTN=$?
if [ $RTN -eq 0 ]
then
# ID the terminal
eval $(ttytype -s)
# In case we are on a GSP/MP that blocks ttytype,
# use resize to query the LINES and COLUMNS
LINES=${LINES:-""}
[ "$LINES" = "" ] && eval $(resize)
# Set stty and tabs
stty erase "^H" kill "^U" intr "^C" eof "^D" -parity ixoff
stty susp \^Z dsusp \^Y
tabs
# Turn off the softkey labels 'cause they burn
# terminal screens and are annoying when editing
# or watching commands and data.
# (no effect for non-softkey terminals)
# Also send an sgr0 (end enhancements) in case it is ON
echo "$(tput rmln)$(tput sgr0)\c"
# Set user's shell to always timeout so forgotten logins will go away
# Change TMOUT to readonly to remind users how important this is.
# For development/deployment, this can be left as a writable variable
# that will require changing at each login..again, to remind users
# that leaving a session open is a security risk.
# To avoid a shell error from TMOUT set to readonly, check using the
# shell readonly builtin for a list of readonly variables and
# skip setting TMOUT if it is already readonly.
STDTMOUT=6000
if [ $(readonly | grep -c TMOUT) -eq 0 ]
then
export TMOUT=${TMOUT:-$STDTMOUT} # undefined
[ $TMOUT = 0 ] && export TMOUT=$STDTMOUT # defined as zero, set to $STDTMOUT
fi
# Set HISTFILE and HISTSIZE
export HISTFILE=${HISTFILE:-$HOME/.sh_history} # if not set already
export HISTSIZE=5000 # history file size
# Set PS1 (customize as needed)
# PS1='${PWD##*/} $' (this shows current directory)
[ $(id -u) -eq 0 ] && PS1="# " || PS1="$ "
# Clear any extra input lines that may be buffered
while :
do
ANS=$(line -t 1)
ERR=$?
[ $ERR -ne 0 ] && break
done
fi
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2010 11:12 PM
01-15-2010 11:12 PM
Re: SAM
#TERM=vt100;export TERM
#sam
Best of luck