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

sysvinit, first steps


since a couple of days, I've started trying to integrate sysvinit in 
Debian/Hurd, and I got some positive results (but also some problems).

My approach has been to follow what alreay been done for 
/libexec/runsystem, and create a new runsystem.sysv alternative; I 
started a first version with part of the .gnu version, just starting 
init at the end.
The other "big change" required is the use of /sbin/{halt,reboot} of 
sysvinit, which currently are not installed in the hurd-i386 version 
because hurd already provides such executables.
Furthermore, I moved the hurd console handling in an own init script, to 
test whether it was a feasible solution).
Generally it worked this way, and I got a system which boots and shuts 
down/reboots (init 0/6), albeit with some hiccups (more on that later).

The issues I found so far (thanks also to Guillem for the kill() hint!) 
are the following:
- as pointed out in an investigation of Guillem some years ago[1],
  kill(-1, signal) as root[2] kills also the processes of the system
  translators; I worked around it with an `exit 0` at the top of
- some/most of the init scripts shipped in "initscripts" need a review
  of their code, especially those that do mount and fsck (although the
  warnings I got apparently didn't give much troubles, I even had the
  /run migration done!)
- apparently the tty's specified in inittab are not started by init;
  I created a init script to startup runttys for that (although I
  consider it a temporary hack)

What could be eventually done right now is:
a) in sysvinit, reenable the installation of sbin & reboot, but with a
   "-sysv" suffix
b) in hurd, give a "-hurd" suffix to sbin & reboot, and make them slaves
   of the "runsystem" alternative; the rational behind this proposal is
   that when using a runsystem.sysv you need to use the sysvinit
   halt/reboot, as the hurd counterparts are not equivalent at all

I'm attaching for reference the runsystem.sysv script, and the hurd-
console and runttys init scripts.

With the premise that I might have got something totally wrong, what do 
you think about this? Feedback of any kind would be welcome.

[1] http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html
[2] called by killall15, invoked in /etc/rc6.d/S20sendsigs (which is 

Pino Toscano

Attachment: hurd-console
Description: application/shellscript

Attachment: runsystem.sysv
Description: application/shellscript

Attachment: runttys
Description: application/shellscript

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply to: