Skip to contentSkip to conversation

Shell prompt - Command not visible

DISCUSSION Aman 1 participant 2 messages Apr 28, 2003 – Apr 29, 2003

lore
Share & tools
lore

Aman

author
#0 lore raw

Hi All

To enable/ disable the shell prompt in linuxppc for IBM 440GP, I wrote two script files. They are as follows

/**********************************************************************/ /* enable_cli.sh: This script is to enable the shell prompt */

grep -v 'sh:123:respawn:/bin/sh < /dev/console > /dev/console 2> /dev/console' /etc/inittab > inittab.tmp
echo 'sh:123:respawn:/bin/sh < /dev/console > /dev/console 2> /dev/console'

Quoted 1 line
Quoted 1 line

inittab.tmp

mv inittab.tmp /etc/inittab
init q /**********************************************************************/ /*disable_cli.sh: This script is to disable the shell prompt */

grep -v 'sh:123:respawn:/bin/sh < /dev/console > /dev/console 2> /dev/console' /etc/inittab > inittab.tmp
mv inittab.tmp /etc/inittab
init q /**********************************************************************/

To enable shell prompt , I give the command "sh enable_cli.sh, to disable the shell prompt "sh disable_cli.sh"

First time things work fine ie enable/disable shell prompt.When enabled, in the shell prompt I can execute the command from the shell prompt. If I disable the shell prompt and enable for the second time, I get the prompt and I can execute command in the prompt, however the commands I type on the prompt is not visible.
I type the enter key continuously I get the shell prompt like this
sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a#
sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a#

sh-2.05a#  sh-2.05a#  sh-2.05a# sh-2.05a# sh-2.05a#  sh-2.05a#   sh-2.05a#
sh-2.05a#  sh-2.05a#  sh-2.05a#  sh-2.05a#  sh-2.05a# sh-2.05a#

Can anybody help me in solving this issue

Regards
Aman

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

author
#1 lore raw

Re: Shell prompt - Problem Solved

Hi All

The echoing of received characters got disabled, when I disable the shell prompt. I used the command "stty echo -F /dev/ttyS0" to enable the echo of the received characters

Regards
Aman

----- Original Message -----
From: "Aman" <[email protected]>
To: "linuxppc embedded" <[email protected]>
Sent: Tuesday, April 29, 2003 12:27 AM
Subject: Shell prompt - Command not visible

Quoted 6 lines

Hi All

To enable/ disable the shell prompt in linuxppc for IBM 440GP, I wrote two script files. They are as follows

Quoted 6 lines

/**********************************************************************/ /* enable_cli.sh: This script is to enable the shell prompt */

grep -v 'sh:123:respawn:/bin/sh < /dev/console > /dev/console 2> /dev/console' /etc/inittab > inittab.tmp
echo 'sh:123:respawn:/bin/sh < /dev/console > /dev/console 2>

/dev/console'

Quoted 12 lines
Quoted 1 line
Quoted 1 line

inittab.tmp

mv inittab.tmp /etc/inittab
init q /**********************************************************************/ /*disable_cli.sh: This script is to disable the shell prompt */

grep -v 'sh:123:respawn:/bin/sh < /dev/console > /dev/console 2> /dev/console' /etc/inittab > inittab.tmp
mv inittab.tmp /etc/inittab
init q /**********************************************************************/

Quoted 4 lines

To enable shell prompt , I give the command "sh enable_cli.sh, to disable the shell prompt "sh disable_cli.sh"

First time things work fine ie enable/disable shell prompt.When enabled,

in

Quoted 3 lines

the shell prompt I can execute the command from the shell prompt. If I disable the shell prompt and enable for the second time, I get the prompt and I can execute command in the prompt, however the commands I type on

the

Quoted 3 lines

prompt is not visible.
I type the enter key continuously I get the shell prompt like this
sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a#

sh-2.05a#

Quoted 12 lines

sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a# sh-2.05a#

sh-2.05a#  sh-2.05a#  sh-2.05a# sh-2.05a# sh-2.05a#  sh-2.05a#   sh-2.05a#
sh-2.05a#  sh-2.05a#  sh-2.05a#  sh-2.05a#  sh-2.05a# sh-2.05a#

Can anybody help me in solving this issue

Regards
Aman

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/