Init Manager Program (or "IMP" for short)
This work in progress tool will be used to manage init scripts, xinetd scripts and any other service control scripts that we might provide.
Design
IMP should support the following features at v0.1
--spell
For use with spells (won't ask any questions). This will switch it to spell mode so that it will look for the scripts in spells init.d directories or xinetd and not ask any extra questions(spells will have to query for installation and call the install command).--enable/--disable-initscript $SCRIPT_NAME [$INITMODULE]
To enable/disable an init script of the current init system along with the ability to enable/disable an init script of a different init system.--install/--deinstall-initscript $SCRIPTNAME [$INITMODULE]
To install/deinstall an init script if --spell is passed it will install a script from init.d dir if it exists else fail. If not running in spell mode it will assume $SCRIPTNAME is the init script one wishes to install.--switch-init $INITMODULE [switch] [reinstall]
This command will make it possible to switch between the default init systems for the user it might optionally call the relevant cast commands and if it can be done deinstall all old ones and install the new ones at the same time.--list-inits
Lists available init modules.--install/--deinstall-xinetdscript $SCRIPTNAME
This works in a similar way to the above initscript command but operates on xinetd scripts.--enable/--disable-xinetdscript $SCRIPTNAME
This works in a similar way to the above initscript command but operates on xinetd scripts.
Possible Extensions
Add support for monit (service monitoring)
--install/--deinstall-servicescript $SCRIPTNAME [$SERVICEMODULE]
This works in a similar way to the above initscript command but operates on service monitoring scripts.--enable/--disable-servicescript $SCRIPTNAME [$SERVICEMODULE]
This works in a similar way to the above initscript command but operates on service monitoring scripts.
Add support to control services (start/stop/restart)
--start/--stop/... $SCRIPTNAME
Basic Layout
{{{/sbin/imp /lib/imp/modules/libcore /lib/imp/modules/system/libsimpleinit-msb /lib/imp/modules/system/libxinetd}}}
Reason of putting the modules into lib is so that it can be accessible without needing to mount /var or any other partition thus it makes it possible to be used in system recovery situations as well (if need be).
