[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: netbsd rc system

On Sat, Jul 28, 2001 at 12:48:26PM -0400, Perry E. Metzger wrote:

> "smoerk@gmx.de" <smoerk@gmx.de> writes:
> > I like the idea to replace sysv init with the netbsd rc system. would
> > it be possible to write an update-rc.d for netbsd rc which emulates the
> > sysv init? so a unmodified debian packaged which uses update-rc.d could
> > be installed. if this works it could be ported to linux and after that
> > the additional functionality of netbsd rc (dependencies) could be
> > introduced.
> I don't understand how update-rc.d works, but if someone points me at
> man pages and the code I could have a look...

I've attached the complete man page, because it's small.  Basically, it
works like this:

       update-rc.d [-n] [-f] name remove

       update-rc.d [-n] name defaults [NN | NN-start NN-stop]

       update-rc.d [-n] name start|stop NN runlevel runlevel  ...
              .  start|stop NN runlevel runlevel ...  . ...

Note that update-rc.d thinks in terms of runlevels, so they need to be emulated
in some fashion by whatever init scheme is in use (see file-rc).

- "remove" should cause the specified init script not to be started or stopped
  at all, from any runlevel.  This will be called immediately after the script
  has been deleted from the system (postrm).  

- "defaults" should cause the script to be started in runlevels 2,3,4,5 and
  stopped in 0,1,6.  NN defaults to 20, and should be used to indicate at which
  point in the start/stop sequence the script should be run.

- "start" and "stop" allow a complete specification of order and runlevels.

If these semantics can be supported by the NetBSD system in a clean way, then a
netbsd-rc package could be introduced that behaves as file-rc.  file-rc diverts
update-rc.d and replaces it with a compatible version which effects the changes
to runlevel.conf instead of switching symlinks.

 - mdz

Attachment: update-rc.d.8.gz
Description: Binary data

Reply to: