On Thu, Nov 12, 2009 at 2:36 PM, Russ Allbery <r...@stanford.edu> wrote:

>
> Nigel Kersten <nig...@google.com> writes:
>
> > Ugh. This is particularly sucky, and I vote this fact needs to be fixed
> > for this irrespective of the plugin loading issue.
>
> > The problem is:
>
> >         if Facter.value(:lsbdistid) == "Ubuntu"
> >            "Ubuntu"
> >         elsif FileTest.exists?("/etc/debian_version")
> >             "Debian"
>
> > the first invocation doesn't fill lsbdistid, so it falls through to
> > Debian when /etc/debian_version exists on Ubuntu.
>
> Inside Puppet, this works fine, since Puppet always loads all plugins.  It
> really only affects the command-line invocation (although I don't know
> what happens if you use facter in a different Ruby program).
>
>
This looks like more of a result of using grep.

If you call facter with operatingsystem, you are asking for just the
operating system.  If you call facter without any arguments, it gives you
everything, then you are grepping for anything that contains the continuous
stream of letters "operatingsystem", whether or not it is a separate word or
not.  That would happen with any program, facter or not.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to