From 3dea5b8df77f1ab8224037eacb186ff0c026e378 Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Fri, 9 Oct 2015 17:12:31 -0400 Subject: Fix debian_codename fact when falling back to parsing /etc/debian_version --- lib/facter/debian_codename.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3