> It's set in lsb.rb.
Thanks.
>
> Though something is perhaps not kosher with it and lsb_release
> although it works fine for me...
>
The issue seems to be that Facter::Util::Resolution::exec is returning
an array, not a string.
My version of Ruby doesn't seem to want to do pattern matches against
arrays, it seems, though that might have been legal on older Ruby
versions?
diff --git a/lib/facter/lsb.rb b/lib/facter/lsb.rb
index f54d75f..2df715f 100644
--- a/lib/facter/lsb.rb
+++ b/lib/facter/lsb.rb
@@ -25,7 +25,7 @@
unless defined?(@@lsbdata) and defined?(@@lsbtime) and
(Time.now.to_i - @@lsbtime.to_i < 5)
type = nil
@@lsbtime = Time.now
- @@lsbdata =
Facter::Util::Resolution.exec('lsb_release -a 2>/dev/null')
+ @@lsbdata =
Facter::Util::Resolution.exec('lsb_release -a 2>/dev/null').join("\n")
end
if pattern.match(@@lsbdata)
>
> Regards
>
> James Turnbull
>
> - --
> Author of:
> * Pro Linux System 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)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEVAwUBSzzCaSFa/lDkFHAyAQKs8Qf8Dvu7HmsHO0llhi/rkWxCP5lY6nShu7ZJ
> pqFjhMkb3OgzW06DX1KyRetvwyoF5uP77+92nS+P1NOXlzYYaJ+E0ysCYSDZ7z8v
> iuiN+tBLsW9sE+yi0T2xGH9yEbcMfSmu7za7II5aEqxvEg0PF4f+xWdMucMf6mpH
> Mk8nULcAfAnGt2EdBW369y5sRaD6oDBdSYfjB3ldjmKF3JfVdnObpvj3bSqi4+pz
> ++aDQRyFN31/M7nGlbXYGfc4Yw7VOC4Vqe70VosikOgRU87zoiV2UCO24j6TGUqt
> w+4ymBqgPP6X8YThgrj1qTyfHMorJx3i1S3BRU8ID3SHNAfkPhkZqw==
> =gGVj
> -----END PGP SIGNATURE-----
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" 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-users?hl=en.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en.