Console - root command prompt displayed twice after hitting enter

Dear All,
I hope you can help me.

I have a pair of E2900's I've inherited. Both running Solaris 9. Both have LOM> consoles. The problem I'm experiencing only occurs when connected to the /dev/console tty. Whenever I hit 'Enter' for a new line, I receive two new lines: -

myhost#                    <--- Hit Enter here
myhost#
myhost#                    <--- Hit Enter here
myhost#
myhost# tty               <--- Hit Enter here

/dev/console
myhost# myhost#

I have tried searching all other places for help, I suspect either my LOM is setup incorrectly or my inittab is.

myhost# myhost# cat /etc/inittab

ap::sysinit:/sbin/autopush -f /etc/iu.ap
ap::sysinit:/sbin/soconfig -f /etc/sock2path
fs::sysinit:/sbin/rcS sysinit           >/dev/msglog 2<>/dev/msglog </dev/console
is:3:initdefault:
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog
sS:s:wait:/sbin/rcS                     >/dev/msglog 2<>/dev/msglog </dev/console
s0:0:wait:/sbin/rc0                     >/dev/msglog 2<>/dev/msglog </dev/console
s1:1:respawn:/sbin/rc1                  >/dev/msglog 2<>/dev/msglog </dev/console
s2:23:wait:/sbin/rc2                    >/dev/msglog 2<>/dev/msglog </dev/console
s3:3:wait:/sbin/rc3                     >/dev/msglog 2<>/dev/msglog </dev/console
s5:5:wait:/sbin/rc5                     >/dev/msglog 2<>/dev/msglog </dev/console
s6:6:wait:/sbin/rc6                     >/dev/msglog 2<>/dev/msglog </dev/console
fw:0:wait:/sbin/uadmin 2 0              >/dev/msglog 2<>/dev/msglog </dev/console
of:5:wait:/sbin/uadmin 2 6              >/dev/msglog 2<>/dev/msglog </dev/console
rb:6:wait:/sbin/uadmin 2 1              >/dev/msglog 2<>/dev/msglog </dev/console
sc:234:respawn:/usr/lib/saf/sac -t 300
co:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` console login: " -T sun -d /dev/console -l console -m ldterm,ttcompat
mF:2345:wait:sh /etc/mflmrcscript > /dev/null 2>&1
myhost# myhost#

Appreciate any help you can offer.

Your /etc/inittab looks fine. I do not think that is the problem.

Anything look strange in either my /etc/profile or /.profile then...

/etc/profile...

#ident   "@(#)profile    1.19    01/03/13 SMI"   /* SVr4.0 1.3   */

# The  profile that all logins get before using their own .profile.

trap  ""  2 3
export LOGNAME PATH

if [ "$TERM" = "" ]
then
         if /bin/i386
        then
                TERM=sun-color
         else
                TERM=sun
        fi
        export TERM
fi

#        Login and -su shells get /etc/profile services.
#       -rsh is  given its environment in its .profile.

case "$0" in
-sh | -ksh  | -jsh | -bash)

        if [ ! -f .hushlogin ]
        then
                 /usr/sbin/quota
                #       Allow the user to break the  Message-Of-The-Day only.
                trap "trap '' 2"  2
                 /bin/cat -s /etc/motd
                trap "" 2

                 /bin/mail -E
                case $? in
                0)
                         echo "You have new mail."
                        ;;
                 2)
                        echo "You have mail."
                         ;;
                esac
        fi
esac

#umask 002
umask  022
trap  2 3


#Modifications Start
PATH=$PATH:/usr/openwin/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/local/bin:/opt/j2sdk1_3_1_02/bin
export  PATH
COBDIR=/opt/lib/cobol
export COBDIR
# The Option below is  needed for the COBOL Licensing daemon
ASLMFRETRY=25,30
export  ASLMFRETRY
LD_LIBRARY_PATH=/opt/lib/cobol/lib
export  LD_LIBRARY_PATH
# Oracle Changes
ORACLE_BASE=/oracle/product/9.2.0
ORACLE_HOME=/oracle/product/9.2.0
ORACLE_SID=INGP
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin
export  ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH

# CICS  Changes
LANG=en_US
#NLS_LANG="ENGLISH_UNITED KINGDOM.WE8ISO8859P1"
NLSPATH=/opt/cics/msg/%L/%N:/opt/cics/msg/C/%N:/opt/dcelocal/nls/msg/%L/%N:/opt/encina/msg/%L/%N:/opt/encina/msg/C/%N:$NLSPATH
CICS_SFS_SERVER=/.:/cics/sfs/hkksnm01
CICS_HOSTS=hkksnm01
RPC_SUPPORTED_PROTSEQS=ncadg_ip_udp
PATH=$PATH:/opt/cics/bin:/opt/dcelocal/bin:/opt/encina/bin:/opt/rexx
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cics/lib:/opt/dcelocal/lib:/opt/encina/lib
ENCINA_BINDING_FILE=/var/cics_servers/server_bindings
export  LANG NLSPATH CICS_SFS_SERVER PATH LD_LIBRARY_PATH CICS_HOSTS  RPC_SUPPORTED_PROTSEQS ENCINA_BINDING_FILE NLS_LANG
# Required for  libconnector support for rts32
export LD_LIBRARY_PATH

#  Modifications End

MANPATH=$MANPATH:/usr/local/man:/usr/man:/usr/share/man;export  MANPATH
PATH=$PATH:/usr/local/bin:/opt/lib/cobol/bin:/usr/local/sbin
EDITOR=/bin/vi;export  EDITOR
stty erase ^H
set -o vi

# Added by EMCpower_install
#PATH=$PATH:/opt/EMCpower/bin:/etc
#export  PATH
# Done additions by EMCpower_install
#JAVA_HOME=/opt/product/j2re1.4.2_04
#export  LANG JAVA_HOME


# DENY DIRECT LOGIN #
# The following  section denys direct login of certain id's.
# To utilize this code:  create a file /etc/profile.no.direct.login.IDs.
# Set ownership of  above file to root, protection to 444.
# Each line in the file  contains one ID for which direct login is prohibited.
# Each entry in  the file must begin in column 1.
#
if [ -f  /etc/profile.no.direct.login.IDs ]
  then
    cat  /etc/profile.no.direct.login.IDs | while read ID_ENTRY;
    do
       if [ "`logname`" == $ID_ENTRY ]
        then
          echo ""
           echo "###########################################"
          echo "#  Direct login not allowed for this ID !! #"
          echo  "###########################################"
          echo ""
           echo "Exiting..."
          sleep 2
          exit
      fi
     done
fi
# END DENY DIRECT LOGIN #

PATH=/usr/bin:$PATH    #  SD Installer: do not remove !
export PATH    # SD Installer: do not  remove !
. /etc/emc/bin/emcp_setup.sh
#
#
############################
#
#/.profile...
#

stty  erase '^H'
export VISUAL=vi
export EXINIT="set showmode showmatch"
export  PS1="`uname -n`# "
#
#
export  PATH=$PATH:/usr/openwin/bin:/opt/VRTS/bin:/usr/local/bin:/usr/symcli/bin
export  MANPATH=$MANPATH:/opt/VRTS/man
alias psora="ps -ef|grep ora"
alias  gnv="get_nic_vals.sh"
alias str="export TERM=vt100;resize"
set -o  vi

export VISUAL=vi
export EXINIT="set showmode showmatch"
export  PS1="`uname -n`# "
#
#
export  PATH=$PATH:/usr/openwin/bin:/opt/VRTS/bin:/usr/local/bin:/usr/symcli/bin
export  MANPATH=$MANPATH:/opt/VRTS/man
alias psora="ps -ef|grep ora"
alias  gnv="get_nic_vals.sh"
alias str="export TERM=vt100;resize"
set -o  vi

something similar on my SF4800 and SF-e4900 consoles as well.

I don't think this is related to something present in .profile[s], else it would have caused the same behavior at normal prompt ( which is not the case. )

What I have been using to eliminate this during major upgrades is "CTRL-j" which simply sends single enter and everything works perfectly okay.

Regards,
BB

Yes, that seems to work. A permanent fix if anyone know's one would be better. Seems like its the old carriage return & new-line being sent when only one of them is required. I wonder if any of these stty settings might be the culprit: -

myhost# myhost# stty -a

speed 9600 baud;
rows = 0; columns = 0; ypixels = 0; xpixels = 0;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase = ^h; kill = ^u;
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
-parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk -crtscts -crtsxoff -parext
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3
myhost# myhost#

I compared your stty output with the one from some of my servers. The only difference I could find - besides erase - is, that you have local mode off (flag -clocal) and it's on here.

This is the output from a V490 console via RSC:

# stty -a
speed 9600 baud;
rows = 0; columns = 0; ypixels = 0; xpixels = 0;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase = ^?; kill = ^u;
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
-parenb -parodd cs8 -cstopb hupcl cread clocal -loblk -crtscts -crtsxoff -parext
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3

I just recalled this sort of behavior is usually started after a longer period of activity on the Consoles.

I'm not sure about this, but it happens likewise .

I just tried one of the consoles on SF-e4900 and its working fine now and I still remember that we had to use the same key-sequence for the whole of night in a upgrade.

hergp:

Can you please check if this time based scenario is there with v490's console as well?

I think I've solved the problem...

myhost# stty igncr
myhost# myhost#
myhost#
myhost#
myhost# fd
ksh: fd:  not found
myhost#
myhost#
myhost# dsfd
ksh: dsfd:  not found
myhost# dfd
ksh: dfd:  not found
myhost#  stty -a
speed 9600 baud;
rows = 0; columns = 0; ypixels = 0; xpixels = 0;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase = ^h; kill = ^u;
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
-parenb -parodd cs8 -cstopb hupcl cread clocal -loblk -crtscts -crtsxoff -parext
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr igncr icrnl -iuclc
ixon -ixany -ixoff imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3

I just tested the clocal hypothesis on a 280 Testserver. The console works find, no matter if clocal is on or off. So this is not the cause of the problem.

This is not the correct way, I tried the same and Hitting Enter didn't produce the execution of command and I had to again send "CTRL-j" for command processing.

I'm now looking towards the console buffer over-flow as I said earlier that this happens with me after a certain period of activity time specially when working through console.

Regards,
BB

Did you try "stty igncr"? I've tried this on both my affected systems and it seems to have done the trick.

My current console settings are working fine.
and setting 'stty igncr' caused me to hit "CTRL+j" again to execute commands on console, as it simply ignored the Carriage return , so had to revert it back to normal.

Regards,