projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f4b2e3
)
try a release facter
author
Peter Palfrader
<peter@palfrader.org>
Sun, 6 Nov 2011 09:23:18 +0000
(10:23 +0100)
committer
Peter Palfrader
<peter@palfrader.org>
Sun, 6 Nov 2011 09:23:18 +0000
(10:23 +0100)
modules/debian-org/lib/facter/software.rb
patch
|
blob
|
history
diff --git
a/modules/debian-org/lib/facter/software.rb
b/modules/debian-org/lib/facter/software.rb
index
237f9fa
..
b9d3e47
100644
(file)
--- a/
modules/debian-org/lib/facter/software.rb
+++ b/
modules/debian-org/lib/facter/software.rb
@@
-83,3
+83,15
@@
Facter.add("unbound") do
FileTest.exist?("/var/lib/unbound/root.key")
end
end
+Facter.add("release") do
+ setcode do
+ r = %x{lsb_release --short --codename}.chomp
+ if r == "n/a"
+ r = %x{lsb_release --short --release}.chomp
+ if r != "testing/unstable"
+ r = 'unknown'
+ end
+ end
+ r
+ end
+end