saltstack/salt — pull request #3635 by gthb (2013-02-07 17:55:17+00:00)
Title: insserv before update-rc.d enable, on Debian 6+

The `update-rc.d enable` fails if the init.d script is installed
manually by another salt state, because `update-rc.d enable` works only
on existing runlevel links. Running `insserv` first fixes that.

NOTE: I'm not entirely sure whether this is the correct fix. Possibly this is
out of scope for `debian_service.enable` and belongs in a separate
`debian_service.install` or somesuch, which the `service.managed` state
should call before calling `enable`. And possibly there should be
corresponding install-service support for Debian systems where
[DependencyBasedBoot] is not enabled. It is the default in Squeeze
upwards though.

[DependencyBasedBoot]: http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot