puppetlabs/puppet — pull request #1143 by hlindberg (2012-09-13 11:15:37+00:00)
Title: (#16189) Make --run_mode a global option

In #16189 the problem is described as config print and --configprint
disagree. That problem was caused by the option --mode RUNMODE defined
in FaceBase not having any effect thus making 'user' be the only runmode
available to any Face.

Rather than implementing another way of modifying the run_mode (as
attempted in FaceBase), this commit makes the previously 'read-only'
global setting --run_mode settable from the command line.

In order to make this global run_mode the default, the Application class
now picks up the default from Settings (where run_mode is handled), and
thus the default becomes either the runmode set from the command line,
or 'user' which Settings has a fallback (default default).

Applications (such as Master) can still set run_mode as part of
application initialization - it works as before.

Unused/non working code relating to this is removed.