:: Re: [DNG] Command to permanently pr…
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Antoine
Ημερομηνία:  
Προς: dng
Αντικείμενο: Re: [DNG] Command to permanently prevent sysvinit from starting daemon
On Sun, Oct 21, 2018 at 11:18:39PM +0200, Arnt Karlsen wrote:
> On Sun, 21 Oct 2018 19:07:36 +0200, Didier wrote in message
> <826ba68a-6289-d047-7e74-d970996d28c4@???>:
>
> > Le 21/10/2018 à 19:01, Didier Kryn a écrit :
> > >     I'm not an expert, but it seems to me the answer is in inittab;
> > > the following line invokes the daemon which launches all the
> > > scripts:
> > >
> > > si::sysinit:/etc/init.d/rcS
> >
> >
> >     Well, there is also the following lines:
> >
> > l0:0:wait:/etc/init.d/rc 0
> > l1:1:wait:/etc/init.d/rc 1
> > l2:2:wait:/etc/init.d/rc 2
> > l3:3:wait:/etc/init.d/rc 3
> > l4:4:wait:/etc/init.d/rc 4
> > l5:5:wait:/etc/init.d/rc 5
> > l6:6:wait:/etc/init.d/rc 6
>
> ..how many "runlevels" _can_ we add here? Can we name them freely?


If you can find it, the manpage for the sysvinit-version of the init command
had good explanations for this. If not, here is what I remember from when I
mucked about with it a few years ago.

There is nothing in sysvinit inherently preventing use of runlevels up to
9. The init 6 = reboot convention is just that: a convention, probably from
the Unix days (those older and more experienced than I: feel free to correct
me if this is wrong). However, the initscript rat's nest makes this
convention difficult to change without digging into /etc/rc[0-6].d/,
/etc/inittab and the initscript files included in any daemon package. As
such, altering it might be an interesting learning experience but is
probably dangerous on a box used for anything other than tinkering.

Another detail that stuck out for me is that sysvinit also has runlevels A,
B and C. These are "overlays" (so to speak) in that starting one of them
doesn't end the daemons from the previous runlevel. My recollections here
are a bit hazy and possibly not entirely reliable, since this behaviour
might instead simply be due to the absence of /etc/rc[A-C].d/ directories.

Hope this helps,

    Antoine


P.S. turns out the sysvinit (8)init manpage is still available at debian.org:

https://manpages.debian.org/jessie/sysvinit-core/inittab.5.en.html

--
Security is the art of making nothing happen.