[Initng] External events
Ismael Luceno
ismael.luceno at gmail.com
Wed Apr 18 07:48:06 CEST 2007
The Problem
===========
I really liked the idea of sfiles, but events simply screws up all.
I mean, we don't have a way to handle events on sfiles, and all the
current functionality can be represented as events...
What should we do about this?
Implementation
==============
First, we need to define a protocol for external events.
This will be the only interface available to any process outside of
initng. So that means it will be used by everything, even by ngc.
I think it should be really simple.
So it should be defined as something like:
char **extern_event;
In which each item has the form "name=val".
Transmission
============
The array can be passed to event subscribers as env[].
It also can be transmitted to/from initng as plain text, one item per
line.
So we could have something like:
event=start
service=daemon/agetty
or
event=mount
device=/dev/sda3
dir=/tmp
Internal/External event translation
===================================
External events may produce internal events, and vice versa.
Event translation will be handled by functions registered in the
event_type.
To avoid loops, a "origin" flag should be placed in s_event, to
mark it as internal/external.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://jw.dyndns.org/pipermail/initng/attachments/20070418/71b93242/attachment.pgp
More information about the Initng
mailing list