On Dec 29, 2008, at 7:21 PM, abakun wrote:
>
> I can not seem to get the --no-daemonize command line option to take
> effect on puppetd. I believe this is because the call to
> Puppet.parse_config, which seems to inherit the values specified in
> defaults.rb, is done AFTER the command line args are parsed. Moving
> the call to Puppet.parse_config to before the each loop for the
> command line args appears to fix it (rough diff, not sure if google's
> message posting interface will munge it):
>
> +# Now parse the config
> +Puppet.parse_config
> +
> begin
> explicit_waitforcert = false
> result.each { |opt,arg|
> case opt
>
> @@@@
>
> $stderr.puts "Try '#{$0} --help'"
> exit(1)
> end
>
> -# Now parse the config
> -Puppet.parse_config
> -
>
> This also makes sense from a UI standpoint: command line options are
> more specific and should override the values of the configuration file
> (unless I'm missing something).
>
> Alternatively, I've taken to including daemonize=false in the conf
> file, but this doesn't match the docs/help.
I don't know why you're experiencing the problem you're having, but --
no-daemonize definitely works for me. Do you have a value for
'daemonize' in your config file?
You can't have the call to parse_config appear before you handle the
cmd-line arguments because then --config won't work.
And the order of processing doesn't matter because the two types of
values (from config file and from cli) go in different buckets, and
access to those buckets is sorted correctly (first cli, then config,
then defaults).
--
If I want your opinion, I'll read your entrails.
--Doug Shewfelt
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---