Hi,<br>
<br>
Well, here I think we have to agree to disagree.&nbsp; 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.&nbsp; For inittab, I chose to.&nbsp; I understand why
you may not wish to.&nbsp; Likewise, there are a number of things that
I wouldn't chose to include in busybox.&nbsp; So, I don't.<br>
<br>
Anyhow, I'm not on a mission to convince anyone of anything.&nbsp; I
was simply trying to contribute a change back to a package that I've
found useful.&nbsp; 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> &lt;<a href="mailto:vda.linux@googlemail.com">vda.linux@googlemail.com</a>&gt; 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>&gt; Well, you might think so, and perhaps there is some avenue that I haven't<br>&gt; explored.&nbsp;&nbsp;I ended up in situations in which a given inittab just wouldn't<br>
&gt; do the trick and only a different inittab would. For example, what serial<br>&gt; lines are started and how.&nbsp;&nbsp;In the end, no amount of scripting seemed to<br>&gt; help. Only a separate inittab.<br>&gt;<br>&gt; My vague memories of the issue (I solved this some time ago and am only now
<br>&gt; getting around to submitting the change), is that serial lines were a<br>&gt; prominent pain.&nbsp;&nbsp;Some systems would start them, others would just error over<br>&gt; and over and over (the serial line didn't exist, for instance). A lot of
<br>&gt; experimenting with all of the different knobs (boot command options,<br>&gt; inittab, scripts, etc) ended up with no real answer and only frustration.<br>&gt; Each system and configuration had its own unique combination of
<br>&gt; requirements. A simple, to the point, change was to simply allow the<br>&gt; specification of the inittab that you wish to be using.<br>&gt;<br>&gt; A second scenario is, say, for an environment in which you want no serial
<br>&gt; input, but want a debug option. A simple approach is a default inittab with<br>&gt; no serial lines, and a debug version with serial lines and shells.<br>&gt;<br>&gt; 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 &quot;reboot by signalling init&quot;.<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 &gt;/dev/console 2&gt;&amp;1 &lt;/dev/null
<br># Run startup script<br>/etc/rc.d/start 3<br># Close all descriptors<br>exec &gt;&amp;- 2&gt;&amp;- &lt;&amp;-<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 &quot;daemon controller&quot; 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 &quot;normal&quot; 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>&gt; This patch very<br>&gt; simply allows you a choice to provide some flexibility and builds upon the
<br>&gt; existing mechanism.&nbsp;&nbsp;As you point out, there are many other choices. This<br>&gt; was one, low-cost, incredibly simple to implement one that I happened to put<br>&gt; together.<br>--<br>vda<br></blockquote></div>
<br>