[Exherbo-dev] Fwd: Initsystem features

Bryan Østergaard bryan.ostergaard at gmail.com
Tue Mar 4 11:07:31 GMT 2008


---------- Forwarded message ----------
From: Bryan Østergaard <bryan.ostergaard at gmail.com>
Date: Sat, Mar 1, 2008 at 12:46 AM
Subject: Initsystem features
To: exherbo-dev at lists.exherbo.org

Hi all.

 I've done a bit of brainstorming on our future initsystem and I think
 I've come up with some ideas that should give us a fairly decent
 initsystem without making it too complex. I'll get a repository set up
 this weekend and start commiting at least this basic documentation and
 perhaps even some code. I'll clean up the language a bit before
 checking it in but wanted to let you all comment on it now.


 - Event based initsystem receiving events from kernel, udev, ..
        Events should include:
        * Insertion and removal of devices
        * Changes in network configuration
        * Events for startup and shutdown / reboot
        * Events for crashes? (crashed services, we'd need to define
 what we mean by crashed)
        * Time/date events? (I don't see any utility of this but it
 would be fairly easy to add if deemed useful)

 - Bash based initscripts
 - /etc/conf.d/* support (would work just like in Gentoo)
 - Automatic restart of crashed services
 - Flexible dependency system (how flexible should it be? do we need
 anything beyond runtime deps, and, or, blocking and some kind of
 - Parallel startup of initscripts
 - Initscripts 'providing' services making it possible to have
 different initscripts providing 'network' for example (maybe an
 exheres virtuals like concept?)
 - Native support for starting services as users other than root
 - Native support for chroot()ed services?
 - User owned initscripts aka $HOME/.events.d/*? There's some obvious
 security issues here but also some very cool possibilities like
 syncing your homedirectory from laptop to server when connecting to
 your homenetworks ESSID for example.
 - Initscript groups (like 'world' and 'system' in arbor but for
 initscripts, primarily meant for use when booting)
 - Possibility to specify initscripts or groups to be started when booting
 - More advanced events, for example based on ESSID (wireless network
 name) - we should probably just treat ESSID changes as normal events..
 do we need any kind of special support for that?
 - Killing runaway services? Needs user defined configuration to make
 any sense imo
 - Do we want timebased events or is that better left for cron? (I
 think cron wins here)
 - Only allow scripts with proper permissions (no o+w for example, for
 user scripts owner needs to match $HOME, ..)

 Filesystem layout:
 /sbin/ contains init and other programs necessary to control initscripts
 /etc/events.d/ contains initscripts
 /etc/conf.d/ contains initscript configuration
 /etc/initium/ contains initsystem configuration (groups, configuration
 on when to restart or kill services and so on)
 $HOME/.events.d/ contains user-specific initscripts - should always be
 spawned as the users uid + gid etc.

 Bryan Østergaard

More information about the Exherbo-dev mailing list