ghoneycutt / puppet-module-inittab

Puppet module to manage inittab
Other
2 stars 26 forks source link

fact operatingsystemmajrelease is not available on Suse #60

Closed jwennerberg closed 10 years ago

jwennerberg commented 10 years ago

From facter-1.7.3 / operatingsystemmajrelease.rb:

Facter.add(:operatingsystemmajrelease) do
  confine :operatingsystem => [
    :Amazon,
    :CentOS,
    :CloudLinux,
    :Debian,
    :Fedora,
    :OEL,
    :OracleLinux,
    :OVS,
    :RedHat,
    :Scientific,
    :SLC
  ]
  setcode do
    Facter.value('operatingsystemrelease').split('.').first
  end
end
mlehner616 commented 10 years ago

That's interesting, it's in the comments but it's not in the actual code. I wonder why it was left out. It looks like it's only all the RedHat derivatives. I may create a PR for facter, because it should be in there anyway, but then the requirement for this module will jump several versions.

We could use the operatingsystemrelease fact which does include SuSE and use only the first section in a similar fashion this fact does. But perhaps that's just a band-aid.

On Thursday, February 13, 2014, Johan Wennerberg notifications@github.com wrote:

From facter-1.7.3 / operatingsystemmajrelease.rb:

Facter.add(:operatingsystemmajrelease) do confine :operatingsystem => [ :Amazon, :CentOS, :CloudLinux, :Debian, :Fedora, :OEL, :OracleLinux, :OVS, :RedHat, :Scientific, :SLC ] setcode do Facter.value('operatingsystemrelease').split('.').first end end

— Reply to this email directly or view it on GitHubhttps://github.com/ghoneycutt/puppet-module-inittab/issues/60 .

ghoneycutt commented 10 years ago

Without Suse support, I think the 2.0.0 release is a bug. I think getting support in Facter is the way to go.

If you can get the module to support Suse while not needing the lsb* facts, I'm quite keen to merge. Else, I think I will have to remove this release since it is currently not working.

mlehner616 commented 10 years ago

I'll try to do both sometime this week. We actually use SuSE here albeit less than RHEL so this is an important issue for me as well.

On Thursday, February 13, 2014, Garrett Honeycutt notifications@github.com wrote:

Without Suse support, I think the 2.0.0 release is a bug. I think getting support in Facter is the way to go.

If you can get the module to support Suse while not needing the lsb* facts, I'm quite keen to merge. Else, I think I will have to remove this release since it is currently not working.

— Reply to this email directly or view it on GitHubhttps://github.com/ghoneycutt/puppet-module-inittab/issues/60#issuecomment-34977772 .

ghoneycutt commented 10 years ago

Awesome! :)

mlehner616 commented 10 years ago

While I'm at it, does this break Solaris as well? I don't have that to test.

ghoneycutt commented 10 years ago

Based on the facter code, it should break on Solaris for the same reason.