aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-10-09 17:12:31 -0400
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-10-09 17:12:31 -0400
commit3dea5b8df77f1ab8224037eacb186ff0c026e378 (patch)
tree8e51c1331ea499ed02d417f3515c2c673f1b1a07
parentf8980538c1e27335d23e971e10487962091c5bb4 (diff)
downloadpuppet-apt-3dea5b8df77f1ab8224037eacb186ff0c026e378.tar.gz
puppet-apt-3dea5b8df77f1ab8224037eacb186ff0c026e378.tar.bz2
Fix debian_codename fact when falling back to parsing /etc/debian_version
-rw-r--r--lib/facter/debian_codename.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/facter/debian_codename.rb b/lib/facter/debian_codename.rb
index 73eeea2..06ec5ff 100644
--- a/lib/facter/debian_codename.rb
+++ b/lib/facter/debian_codename.rb
@@ -32,7 +32,7 @@ Facter.add(:debian_codename) do
setcode do
debian_version = File.open('/etc/debian_version', &:readline)
if debian_version.match(/^\d+/)
- version_to_codename(version_to_codename.scan(/^(\d+)/)[0][0])
+ version_to_codename(debian_version.scan(/^(\d+)/)[0][0])
elsif debian_version.match(/^[a-z]+\/(sid|unstable)/)
debian_version.scan(/^([a-z]+)\//)[0][0]
end