reboot
Rob Landley
rob at landley.net
Mon Oct 17 09:01:05 UTC 2005
On Monday 17 October 2005 02:41, Denis Vlasenko wrote:
> > > It's old System V way of doing thing, and it is _wrong_.
> >
> > So it should _not_ respawn mingetty on /dev/tty* when you exit?
>
> On my system supervise does it way better.
So you wrote a daemon to replace init because you don't like init. Ok.
> Say, I can stop
> getty respawning on a particular tty wuth single command:
> svc -d /var/service/tty6.
> How would you do it with init? By editing inittab and sending
> some signal to init, right? Ain't that way more complicated?
I'm trying to remember the last time I actually had to do this. Generally I
configure a system with a fixed set of console I/O devices, and then ignore
them all and either ssh into it or run X on it...
> I started from some router boxes, but then migrated all other boxes
> under my control, including desktops, to this method of
> spawning/controlling processes as it turned out to be much simpler.
You don't like to use init, therefore you don't use it. Ok.
Busybox init should therefore behave differently, because you don't want to
use it. I don't follow that part.
If you don't configure init into busybox, then halt and reboot and such
shouldn't go through init restart the system. This is currently the case.
(And if it's not working, that's a bug we should fix.)
> That "runlevels" nonsense is like a bad dream.
Busybox init has never supported runlevels.
> I can selectively
> stop/start _any_ subset of daemons with few svc commands,
> not just subsets defined in inittab.
I generally just start the daemons from my init script (which is bsd-style,
meaning it's just a shell script and not 8 gazillion tiny shell scripts
called with "start", "stop", "pause", "revert", "incinerate", and whatever
other argument system 5 style init scripts take).
Generally, I don't worry about restarting them because if they go down it's a
_bug_.
I believe my shutdown script has "killall -TERM -1; sleep 3; killall -9 -1" in
it, or I might let init do that. I honestly don't care that much.
> Let's imagine... hmm.. that I want to stop everything and go to singleuser
> for filesystem repair.
init=/bin/sh
> # cd /var/service
> # svc -d * */log; svc -u getty*
>
> Everything will stop, then only getty's will restart.
Actually on red hat "init 1" worked pretty well for me seven years ago. Not
that this is an endorsement, but saying that your script works as well as a
seven year old Red Hat isn't either.
> > If you don't _need_ init, don't use it...
>
> I am doing exactly this, and want to let people know that it actually
> works rather nice. It's not a religious war, I am not trying
> to "convert" you or everybody else.
I'm just trying to figure out what change you want to make to busybox, and not
particularly interested in a "gee, why do you all you crazy people use init,
what's wrong with you" digression. You asked why it happened that way.
Computer history is a hobby of mine. :)
If you don't build init into busybox, then the reboot and such utilities won't
call init. I'm pretty sure this is documented somewhere, possibly not
prominently enough...
Rob
More information about the busybox
mailing list