puppetlabs/puppet — pull request #1473 by stschulte (2013-02-13 23:24:38+00:00)
Title: Do not reboot system when runnnig puppet resource service

Some initscripts are not save to execute on different systems. Example:
If you run `/etc/init.d/reboot.sh status` on a gentoo system you will
immediatly reboot the system.

This can be a problem if you run `puppet resource service` as puppet
will try to get a list of services and then runs the status command on
all of them.

The issue was first addressed in redmine ticket #14615 and #14761 and
introduced different exclude lists for the gentoo provider and the
redhat provider. Unfortunately this did not resolve the problem because
when running `puppet resource service` puppet will not just query the
most suitable provider for a list of services but all suitable
providers. So if the gentoo provider now hides the `reboot.sh` script,
but the init provider (which is also suitable) does not, puppet will
ask the init provider to get the status of the service. As a result
the init provider will now happily reboot the system.

Move the exclude lists into the init provider so the init provider does
the filtering. Each provider that uses the `init` provider as its parent
does not have to do any filtering anymore.

This fix assumes that an initscript that has to be excluded on one
system is never a valid initscript on another system. Given the recent
list of excludes (reboot.sh, shutdown.sh, etc) this seems valid