Skip to content

(FACT-1527) Fix Gentoo not reading os release fact correctly#1462

Merged
MikaelSmith merged 1 commit intopuppetlabs:masterfrom
ananace:fix-gentoo-release-fact
Oct 28, 2016
Merged

(FACT-1527) Fix Gentoo not reading os release fact correctly#1462
MikaelSmith merged 1 commit intopuppetlabs:masterfrom
ananace:fix-gentoo-release-fact

Conversation

@ananace
Copy link
Contributor

@ananace ananace commented Oct 28, 2016

No description provided.

{ string(os::oracle_enterprise_linux), string(release_file::oracle_enterprise_linux) },
{ string(os::oracle_vm_linux), string(release_file::oracle_vm_linux) },
{ string(os::arista_eos), string(release_file::arista_eos) },
{ string(os::gentoo), string(release_file::gentoo) },

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this works because the 1st thing we do after is look for the pattern release (\d[\d.]*) in the first line. That matches Gentoo Base System release 2.2, and the rest falls together.

@MikaelSmith
Copy link

Thanks! Looks like that was easy; you've verified it works on your system?

@ananace
Copy link
Contributor Author

ananace commented Oct 28, 2016

Certainly seems that way;

$ facter os
...
  family => "Gentoo",
  hardware => "x86_64",
  name => "Gentoo",
  release => {
    full => "4.8.0",
    major => "4",
    minor => "8"
  },
...
$ ./facter os
...
  family => "Gentoo",
  hardware => "x86_64",
  name => "Gentoo",
  release => {
    full => "2.2",
    major => "2",
    minor => "2"
  },
...
$ cat /etc/gentoo-release
Gentoo Base System release 2.2

@MikaelSmith MikaelSmith merged commit ab3eeee into puppetlabs:master Oct 28, 2016
@MikaelSmith
Copy link

Manually confirmed CLA has been signed. Thanks for the contribution!

@ananace
Copy link
Contributor Author

ananace commented Oct 28, 2016

Happy to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants