-sh: can't access tty; job control turned off - busybox v1.6.0

Tallam, Sreenivas Sreenivas.Tallam at netapp.com
Tue Jan 29 21:49:11 UTC 2008


Hi vda,

Thanks for the reply.
But unfortunately that does not work for me.

Since my /bin dir does not have setsid or cttyhack utilities in it.

# cd /bin
# ls
addgroup       deluser        ln             ping           sync
adduser        df             login          ping6          tar
ash            dmesg          ls             ps             tempfile
busybox        dnsdomainname  mkdir          pwd            touch
cat            echo           mknod          readlink       true
chgrp          false          mktemp         rm             umount
chmod          grep           more           rmdir          uname
chown          gunzip         mount          run-parts      usleep
chroot         gzip           mt             sed            vi
cp             hostname       mv             sh             watch
date           ip             netstat        sleep          zcat
dd             ipcalc         nice           stty
delgroup       kill           pidof          su

Any other clues?

Thanks,
Sreen

-----Original Message-----
From: Denis Vlasenko [mailto:vda.linux at googlemail.com] 
Sent: Sunday, January 27, 2008 3:54 PM
To: busybox at busybox.net
Cc: Tallam, Sreenivas
Subject: Re: -sh: can't access tty; job control turned off - busybox
v1.6.0

On Saturday 12 January 2008 02:02, Tallam, Sreenivas wrote:
> Hi All,
>  
> This has been discussed in the forum before but all of them were 
> focused with a busybox version lower than what I am using So I am 
> asking this question to the yet again, please bear with me
>  
> I am running a linux 2.6.10 kernel with a BusyBox v1.6.0.
> And I see the following error on the above
>  
> My inittab, has the following enteries # cat /etc/inittab
> 
> # Default entries for busybox init.
> ::ctrlaltdel:/sbin/reboot
> ::shutdown:/bin/umount -a -r
> ::shutdown:/sbin/swapoff -a
> ::restart:/sbin/init
> ::askfirst:-/bin/sh

In this case, /bin/sh will have /dev/console as a tty.
/dev/console is handled specially by kernel and cannot be a *controlling
tty*.

older busybox's init contained a hack which "cheated" and opened
*different* /dev/xxx. The hack is now moved to separate helper applet -
cttyhack, so that people who need /dev/console really get what they
want.

Try this:

::askfirst:/bin/setsid /bin/cttyhack /bin/sh

[should work without setsid too]
--
vda



More information about the busybox mailing list