Luke Kanies wrote:
> 
> The applications don't define this setting, they just test for it in  
> Puppet[:daemonize], which should correctly be set by our getopt parser  
> interpreting -D.
> 

But the getopt parser in application.rb only seems to handle long options.

   # used to declare code that handle an option
    def option(*options, &block)
        long = options.find { |opt| opt =~ /^--/
}.gsub(/^--(?:\[no-\])?([^ =]+).*$/, '\1' ).gsub('-','_')
        fname = "handle_#{long}"
        if (block_given?)
            meta_def(symbolize(fname), &block)
        else
            meta_def(symbolize(fname)) do |value|
                self.options["#{long}".to_sym] = value
            end
        end
        @opt_parser.on(*options) do |value|
            self.send(symbolize(fname), value)
        end
    end

Unless I am misreading this?

Regards

James Turnbull

-- 
Author of:
* Pro Linux Systems Administration
(http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet
(http://tinyurl.com/pupbook)
* Pro Nagios 2.0
(http://tinyurl.com/pronagios)
* Hardening Linux
(http://tinyurl.com/hardeninglinux)

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to