aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/facter/debian_nextcodename.rb9
-rw-r--r--lib/facter/util/ubuntu.rb1
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/facter/debian_nextcodename.rb b/lib/facter/debian_nextcodename.rb
index 6e994a4..c4c569b 100644
--- a/lib/facter/debian_nextcodename.rb
+++ b/lib/facter/debian_nextcodename.rb
@@ -8,11 +8,10 @@ def debian_codename_to_next(codename)
if codename == "sid"
return "experimental"
else
- codenames = Facter::Util::Debian::CODENAMES.values
- i = codenames.index(codename)
- if i and i+1 < codenames.count
- return codenames[i+1]
- end
+ codenames = Facter::Util::Debian::CODENAMES
+ versions = Facter::Util::Debian::CODENAMES.invert
+ current_version = versions[codename]
+ return codenames[(current_version.to_i + 1).to_s]
end
end
diff --git a/lib/facter/util/ubuntu.rb b/lib/facter/util/ubuntu.rb
index 1b2411a..52c15e8 100644
--- a/lib/facter/util/ubuntu.rb
+++ b/lib/facter/util/ubuntu.rb
@@ -14,6 +14,7 @@ module Facter
"utopic",
"vivid",
"wily",
+ "xenial"
]
end
end