Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Amazon 2 detection #261

Merged
merged 1 commit into from
Jul 6, 2018
Merged

Fix Amazon 2 detection #261

merged 1 commit into from
Jul 6, 2018

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented Jul 6, 2018

The elif that looks for /etc/system-release was firing for Amazon 2 and the /etc/os-release parsing was never occurring. This moves all logic to the first check and then attempts to parse the data from /etc/os-release if the file exists (2015+). Slightly harder to grok due to the funky sh string check we have no, but it should be functional on all systems w/o risking impact to other RHEL systems.

Signed-off-by: Tim Smith tsmith@chef.io

The elif that looks for /etc/system-release was firing for Amazon 2 and the /etc/os-release parsing was never occurring. This moves all logic to the first check and then attempts to parse the data from /etc/os-release if the file exists (2015+). Slightly harder to grok due to the funky sh string check we have no, but it should be functional on all systems w/o risking impact to other RHEL systems.

Signed-off-by: Tim Smith <tsmith@chef.io>
@tas50 tas50 requested a review from a team as a code owner July 6, 2018 20:09
Copy link

@scotthain scotthain left a comment

Choose a reason for hiding this comment

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

Ah that's unfortunate :(

Fix looks solid.

@tas50 tas50 merged commit c27e523 into master Jul 6, 2018
@tas50 tas50 deleted the amazon2_round2 branch July 6, 2018 20:23
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.

None yet

2 participants