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

Fedora Goals -- LSB-compliant/ideal init for FC5+ - Python test scripts for Proof of Concept

For testing purposes and proof of concept, I have written some python scripts as an "rc" replacement. I've done this, because I haven't seen any code from others (where is the code of SystemServices??) and because I want to experiment with some concepts, before something is set to stone.


The python script ServiceManager.py reads all /etc/init.d/* scripts and creates DBUS "Service" objects. These parse the chkconfig and LSB-style comments of their script and provide a DBUS interface to retrieve information and control them. Note: I am new to DBUS, so forgive me, if I haven't understood the concept of objects, interfaces and busses correctly, yet.

To use the glib main_loop from python without the need of gtk (import gtk needs a working X11 DISPLAY), I patched the dbus python bindings to provide dbus.main_loop():

etc_dbus-1_system.d_rc.conf has to be placed to /etc/dbus-1/system.d/rc.conf

ServiceTestClient.py is a small client test app, which queries all available services.

As you can see, ServiceManager.py was just started and is not ready yet, but release early, release often. Stay tuned. Maybe someone is interested and wants to help, or it maybe inspires others to develop a completly other implementation.

Next steps I want to do:
- replace rc functionality for complete backwards compatibility
- implement the depends/requires mechanism (also with dynamic requirements and dependencies)
- patch all initscripts to conform to LSB
- convert prefdm to an initscript which requires $authentication and $local_dir
- create an initscript, which provides $authentication and depends on $network, if network auth is needed.
- convert /etc/init.d/functions and /sbin/service to use the DBUS interface

Have fun!


Code, code, give me some open source code!

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