Hi,<br>
<br>
Well, here I think we have to agree to disagree. I like it; I use
it; I added some more flexibility to it in a very few lines of code.
The wonderful thing about busybox is that you can choose to have this
support or not. For inittab, I chose to. I understand why
you may not wish to. Likewise, there are a number of things that
I wouldn't chose to include in busybox. So, I don't.<br>
<br>
Anyhow, I'm not on a mission to convince anyone of anything. I
was simply trying to contribute a change back to a package that I've
found useful. That's all.<br>
<br>
Best wishes,<br>
-b<br>
<br><br><div><span class="gmail_quote">On 11/1/06, <b class="gmail_sendername">Denis Vlasenko</b> <<a href="mailto:vda.linux@googlemail.com">vda.linux@googlemail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wednesday 01 November 2006 17:35, B Thomas wrote:<br>> Well, you might think so, and perhaps there is some avenue that I haven't<br>> explored. I ended up in situations in which a given inittab just wouldn't<br>
> do the trick and only a different inittab would. For example, what serial<br>> lines are started and how. In the end, no amount of scripting seemed to<br>> help. Only a separate inittab.<br>><br>> My vague memories of the issue (I solved this some time ago and am only now
<br>> getting around to submitting the change), is that serial lines were a<br>> prominent pain. Some systems would start them, others would just error over<br>> and over and over (the serial line didn't exist, for instance). A lot of
<br>> experimenting with all of the different knobs (boot command options,<br>> inittab, scripts, etc) ended up with no real answer and only frustration.<br>> Each system and configuration had its own unique combination of
<br>> requirements. A simple, to the point, change was to simply allow the<br>> specification of the inittab that you wish to be using.<br>><br>> A second scenario is, say, for an environment in which you want no serial
<br>> input, but want a debug option. A simple approach is a default inittab with<br>> no serial lines, and a debug version with serial lines and shells.<br>><br>> Overall, inittab is a very simple, sane, usable solution.
<br><br>What is so simple about inittab? Don't forget that you have<br>dedicated C code in init which needs to handle it, with all that<br>nasty little quirks about signal handling, controlling ttys,<br>respawning etc... and I did not even started to mention sysV
<br>runlevel insanity, or that idiotic "reboot by signalling init".<br><br>All this can be handled without inittab *at all*. My init<br>parameter is: init=/init. cat /init:<br><br>#!/bin/sh<br># Set up env<br>unset HOSTNAME
<br>unset devfs<br>unset MACHTYPE<br>unset SHLVL<br>unset SHELL<br>unset HOSTTYPE<br>unset OSTYPE<br>unset HOME<br>unset TERM<br>export PATH=/bin:/usr/bin<br># Open console<br>exec >/dev/console 2>&1 </dev/null
<br># Run startup script<br>/etc/rc.d/start 3<br># Close all descriptors<br>exec >&- 2>&- <&-<br># Sleep forever<br>while true; do env - sleep 32000; done<br><br>There you have it. Make /etc/rc.d/start start gettys,
<br>network daemons, serial line daemons, databases etc etc etc.<br>Use whatever "daemon controller" tool which suits you<br>(there are several popular ones on the Net).<br>Kernel's parameters are propagated into /etc/rc.d/start
<br>too (in the environment).<br><br>Why bother init task with this mess? It is critical<br>and harder to debug than "normal" programs, so keep it simple.<br><br>Of course I do not plan to throw init out of busybox,
<br>there are too many users of it, but I am sort of reluctant<br>to _add_ even_ more_ code_ to it. For one, why other<br>init's out there do not have such thing as alternate inittab?<br><br>> This patch very<br>> simply allows you a choice to provide some flexibility and builds upon the
<br>> existing mechanism. As you point out, there are many other choices. This<br>> was one, low-cost, incredibly simple to implement one that I happened to put<br>> together.<br>--<br>vda<br></blockquote></div>
<br>