Add enhanced functionality to insserv provider

Details

Description

Debian 6 (squeeze) uses insserv to perform dependency based booting by scraping requirements from the LSB header in init scripts (provided /etc/init.d/.legacy-bootordering does not exist). It thus overrides update-rc.d. From "update-rc.d-insserv":

# All start/stop/defaults arguments are discarded so emit a
# message if arguments have been given and are in conflict
# with Default-Start/Default-Stop values of LSB comment.

This was discovered in testing CHEF-1407 and a basic insserv provider was written. It inherits the actions for controlling the service from the init provider, and itself provides enable/disable actions. It does not support any way to modify priorities or runlevels with enable or disable.

insserv lacks a feature to describe the current state of a service in respect to it being enabled or disabled, so you must interrogate the links in /etc/rc* directly. This makes writing the code in load_current_resource to determine the state difficult.

insserv does allow you to override runlevels, although it's a bit finicky with its syntax and silently ignores you if you get it wrong. Note that you have to use 'insserv -r SERVICE' to remove these links before you can use 'insserv -d SERVICE' to create the appropriate ones.

Current workaround seems to be not using the enable/disable actions of the service provider and calling out to insserv as specified above using the execute resource.

I don't believe specifying priorities is going to possible or appropriate with insserv because the boot order is dependency based. If the user wanted to override this boot order, they should use one of the file resource derivatives to create an appropriately named file with a new LSB header in /etc/insserv/overrides.