[Telnet] Can't resolv "sh: can't access tty; job control turned off"

Laurent B the_ccm at hotmail.com
Mon Jan 15 05:23:33 PST 2007


Hi,

I spent a lot of hours on this problem and I don't know how to resolve. I'm 
getting this problem only with telnet (and also ssh etc). telnet launched 
from rcS script

when I login with telnet on my board, very famous message  :
"-sh: can't access tty; job control turned off"
also when I try "echo hello > /dev/tty" , got "cannot create /dev/tty: No 
such device or address"
but "echo hello > /dev/tty" seems to work

first, under telnet when I type "tty" it gives me : "/dev/pts/0"
so I think there is a problem with pts devices.

What am I missing ? really need help getting crazy :)

thanks,

Laurent


* Support for pty is enabled into kernel :
cat /proc/tty/drivers
/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
/dev/vc/0            /dev/vc/0       4       0 system:vtmaster
serial               /dev/ttyS       4 64-67 serial
pty_slave            /dev/pts      136 0-1048575 pty:slave
pty_master           /dev/ptm      128 0-1048575 pty:master
unknown              /dev/tty        4 1-63 console


*pty busybox support enabled :
cat .config | grep PTS
CONFIG_FEATURE_DEVPTS=y
CONFIG_FEATURE_VI_SETOPTS=y
# CONFIG_LOGIN_SCRIPTS is not set
# CONFIG_ASH_GETOPTS is not set


*inittab file :

::sysinit:/etc/init.d/rcS
ttyS0::respawn:/sbin/getty -L ttyS0 19200 vt100

vc/1::respawn:/sbin/getty 38400 /dev/vc/1
tty::respawn:/sbin/getty 19200 /dev/tty vt100
pts/0::respawn:/sbin/getty 38400 /dev/pts/0

::ctrlaltdel:/sbin/reboot
::shutdown:/sbin/swapoff -a
::shutdown:/bin/umount -a -r
::restart:/sbin/init

*rcS script

#!/bin/sh
mount -t devfs /sys
mount -t proc /proc /proc
mount -t devfs /sys
mount -o remount,rw /
mount -a
ifconfig eth0 192.168.62.44 netmask 255.255.255.0
route add default gw 192.168.62.251
export TERM=linux
telnetd
syslogd

*devices files :
crw-r--r--    1 root     root       5,   0 Nov 30 00:16 tty
crw-rw-rw-    1 root     tty        5,   2 Nov 30 00:15 ptmx
crw-rw-rw-    1 root     tty        2, 176 Nov 30 00:18 ptya0
crw-rw-rw-    1 root     tty        2, 177 Nov 30 00:18 ptya1
crw-rw-rw-    1 root     tty        2, 178 Nov 30 00:18 ptya2
crw-rw-rw-    1 root     tty        2, 179 Nov 30 00:18 ptya3
crw-rw-rw-    1 root     tty        2, 180 Nov 30 00:18 ptya4
crw-r--r--    1 root     root       4,   0 Nov 30 00:14 tty0
crw--w--w-    1 root     root       4,   1 Nov 30 00:06 tty1
crw-------    1 root     root       4,   2 Nov 30 00:14 tty2
crw-------    1 root     root       4,   3 Nov 30 00:14 tty3
crw-rw-rw-    1 root     tty        3, 176 Nov 30 00:18 ttya0
crw-rw-rw-    1 root     tty        3, 177 Nov 30 00:18 ttya1
crw-rw-rw-    1 root     tty        3, 178 Nov 30 00:18 ttya2
crw-rw-rw-    1 root     tty        3, 179 Nov 30 00:18 ttya3
drwxr-xr-x    2 root     root            0 Nov 30 00:00 pts

*mounted FS :
rootfs on / type rootfs (rw)
/dev/root on / type ext2 (rw)
sysfs on /sys type sysfs (rw)
/proc on /proc type proc (rw)
none on /dev/pts type devpts (rw)

_________________________________________________________________
Avec Windows Live OneCare éliminez tous les virus de votre PC ! 
http://www.windowslive.fr/liveonecare/default.asp



More information about the busybox mailing list