Bug 1244 testcase

Eric Spakman E.Spakman at inter.nl.net
Sun Mar 4 14:50:51 UTC 2007


Hi Denis,

> The attached standalone utility shall be able to automatically
> do it for specified program. Usage:
>
> -::sysinit:/etc/init.d/rcS [args]
> +::sysinit:/path/to/cttyhack /etc/init.d/rcS [args]
>
>
> It is not meant to be a permanent solution, I just want to check
> whether the problem is caused by lack of ctty for sysinit actions.
>
> If it is true, then "real" fix is to determine why your sysinit
> actions require ctty. They should not need it, I think.
>
> cttyhack may be useful and even may be added to bbox, but it is still an
> ugly non-portable hack. --
> vda
>
This hack does indeed work, but I had to add it in 3 places:
::sysinit:/sbin/cttyhack /etc/init.d/rcS
::wait:/sbin/cttyhack /etc/init.d/rc 2
......
::shutdown:/sbin/cttyhack /etc/init.d/rc 0

to see boot and shutdown messages and to start/stop all the daemons and
programs.

I have an updated Qemu image with cttyhack and changed inittab in
ftp://espakman.dyndns.org/pub/denis/

It's indeed strange that some daemons seem to need a controlling tty, at
least dnsmasq, openntpd and ulogd won't start without and I can imagine
there are more. Shorewall contains shell scripts and that won't seem to
start either without the cttyhack.

But what's also annoying without a ctty is that no startup and shutdown
output is shown, even when busybox init is compiled with
"FEATURE_INIT_SCTTY and a "-" in the inittab.

Anyway, those problems are solved with "cttyhack". What was the reason for
the changes in Revision 17937, portability? Or can I read it somewhere in
the mail archives?

Regards,
Eric




More information about the busybox mailing list