jalmeida at math.ist.utl.pt
Sat Feb 17 01:25:40 PST 2007
On Sat, 17 Feb 2007, TheOldFellow wrote:
> Jorge Almeida wrote:
>> I'm trying to understand how to use runit as substitute for sysvinit.
>> The file hints/ATTACHMENTS/build-with-runit/build-with-runit-scripts.txt
>> dates from 2004. Can anybody elaborate on this? (I mean, is it
>> deprecated or just lacking a maintainer?) The hint says the author
>> no longer supports using runit, but I really like the approach. Would
>> the stage 1 and 3 files produced by the installer still be appropriate
>> for a recent LFS system?
>> Any input would be welcome.
> I wrote it. And in fact have gone back to using it recently. The ideas
> in the hint are still correct AFAIK, but there will be minor variations
> with the increments of packages.
> What I now do is to build LFS or CLFS according to the book, but omiting
> sysvinit and syslog. I even install the bootscripts! Then I install
I think that's the approach of Debian, judging from the contents of the
runit package (I don't have a debian system, and I don't have any
experience with debian).
> runit mostly into /sbin and /usr/sbin - I don't bother with dietlibc any
For some special reason? I compiled runit against dietlibc with no
> more. My /etc/runit/1 script is just a list of calls to the LFS
> # system one time tasks
> /etc/rc.d/init.d/mountkernfs start
> /etc/rc.d/init.d/modules start
> /etc/rc.d/init.d/udev start
> /etc/rc.d/init.d/swap start
> /etc/rc.d/init.d/checkfs start
> /etc/rc.d/init.d/mountfs start
> /etc/rc.d/init.d/udev_retry start
> /etc/rc.d/init.d/cleanfs start
> /etc/rc.d/init.d/setclock start
> /etc/rc.d/init.d/console start
> /etc/rc.d/init.d/localnet start
> /etc/rc.d/init.d/sysctl start
> /etc/rc.d/init.d/random start
> touch /etc/runit/stopit
> chmod 0 /etc/runit/stopit
Yes, this is much cleaner than the sysvinit stuff...
I suppose this is the place to add other one-time tasks (ulogd,
BTW, what if some of these scripts fails?
And what about /etc/init.d/kerneld start and /etc/init.d/rmnologin ?
(http://smarden.org/runit/replaceinit.html, Step 5)
One question: my current distro (gentoo) forces a fs check after so many
days or so many mounts, which seems a prudent idea. Should I try to
adapt the corresponding gentoo checkfs script?
> The /etc/runit/3 script is similar, but with 'stop', and only for those
> scripts that have something in the stop branch of the case.
One question regarding stage 2: some services just insist on going to
the background and refuse to write to STDOUT (can't think of an example
right now, but I'm sure they're out there). What do you do in such
cases? Dump them to stage 1?
> I hope this helps,
It certainly does.
>if you need more just ask.
Will do (and did):)
More information about the lfs-support