joshcooper/puppetlabs-reboot — pull request #16 by joshcooper (2013-10-17 06:19:32+00:00)
Title: (Maint) Deprecate the `prompt` parameter

The `prompt` parameter was intended to allow a reboot to be canceled
when running puppet interactively, e.g. for testing, demo, etc. However,
if you are running `puppet agent`, and prompt is true, the system will
display a dialog box on the hidden service desktop (since services are no
longer allowed to interact with the desktop). This will cause the agent to
hang waiting for user input that never arrives.

This commit causes puppet to issue a deprecation warning when prompt is
set to true. The behavior when prompt is unspecified or set to false is
unchanged.

Instead of relying on the prompt parameter to cancel a shutdown, issue
the command:

shutdown /a