puppetlabs/puppet — pull request #1051 by joshcooper (2012-08-17 21:55:22+00:00)
Title: (#15693) Allow windows service restart command to be specified

Previously, the windows service provider did not support specifying a
custom restart command, and instead would always just call stop & start.
The ability to customize restarts is desirable in cases where the service
must be stopped in order to overwrite a file the service is using.

This commit refactors the instances, restart, and restartcmd methods
from the base provider to a new parent service provider. It also
refactors the ucommand and texecute methods.

There are no changes to the base service provider other than those
methods residing in the parent service.

The windows service provider no longer implements the restart method
directly as its parent service provider handles this correctly.

I didn't refactor the start and stop methods to make them
customizable, because it's not as critical for Windows and it was more
changes than I wanted to make now.