Fix debian_codename fact when falling back to parsing /etc/debian_version
This commit is contained in:
parent
f8980538c1
commit
3dea5b8df7
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ Facter.add(:debian_codename) do
|
||||||
setcode do
|
setcode do
|
||||||
debian_version = File.open('/etc/debian_version', &:readline)
|
debian_version = File.open('/etc/debian_version', &:readline)
|
||||||
if debian_version.match(/^\d+/)
|
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)/)
|
elsif debian_version.match(/^[a-z]+\/(sid|unstable)/)
|
||||||
debian_version.scan(/^([a-z]+)\//)[0][0]
|
debian_version.scan(/^([a-z]+)\//)[0][0]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue