diff options
author | intrigeri <intrigeri@boum.org> | 2016-11-02 07:32:03 +0000 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2016-11-02 07:32:03 +0000 |
commit | 5e39cd0c5039223f11eb548e7dca5b43229b3627 (patch) | |
tree | 7181cc153b423b6e2581fee7ff9554e79a815e3b /lib/facter | |
parent | 20c90d2dc61c2b1d15bebc88c839e90ef99e4b2e (diff) | |
parent | d4c87772bd31821c91f9ba149b5dc06959bc7155 (diff) |
Merge remote-tracking branch 'shared/master' into feature/debian_codename_to_version
Diffstat (limited to 'lib/facter')
-rw-r--r-- | lib/facter/debian_nextcodename.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/facter/debian_nextcodename.rb b/lib/facter/debian_nextcodename.rb index c4c569b..654fe20 100644 --- a/lib/facter/debian_nextcodename.rb +++ b/lib/facter/debian_nextcodename.rb @@ -4,8 +4,10 @@ rescue LoadError require "#{File.dirname(__FILE__)}/util/debian" end -def debian_codename_to_next(codename) - if codename == "sid" +def debian_codename_to_next(codename, release) + if release == "testing" + return "sid" + elsif release == "unstable" return "experimental" else codenames = Facter::Util::Debian::CODENAMES @@ -18,6 +20,6 @@ end Facter.add(:debian_nextcodename) do confine :operatingsystem => 'Debian' setcode do - debian_codename_to_next(Facter.value('debian_codename')) + debian_codename_to_next(Facter.value('debian_codename'), Facter.value('debian_release')) end end |