Ivan Porto Carrero wrote: > Signed-off-by: Ivan Porto Carrero <i...@flanders.co.nz> > --- > lib/facter/operatingsystem.rb | 4 ++++ > lib/facter/operatingsystemrelease.rb | 2 +- > 2 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/lib/facter/operatingsystem.rb b/lib/facter/operatingsystem.rb > index a90c283..8381da1 100644 > --- a/lib/facter/operatingsystem.rb > +++ b/lib/facter/operatingsystem.rb > @@ -24,7 +24,11 @@ Facter.add(:operatingsystem) do > if Facter.value(:lsbdistid) == "Ubuntu" > "Ubuntu" > elsif FileTest.exists?("/etc/debian_version") > + if FileTest.exists?("/etc/lsb-release") > + File.read("/etc/lsb-release") =~ /ubuntu/i ? "Ubuntu" : "Debian" > + else > "Debian" > + end > elsif FileTest.exists?("/etc/gentoo-release") > "Gentoo" > elsif FileTest.exists?("/etc/fedora-release")
Doesn't this assume LSB is always installed - is that the case? Regards James Turnbull -- James Turnbull Puppet Labs 1-503-734-8571 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.