-
Notifications
You must be signed in to change notification settings - Fork 90
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
Use /etc/os-release for SUSE detection #476
Conversation
Moves the windows test into it's own block since it's not part of the set of debian tests. Signed-off-by: Russell Cardullo <russellcardullo@gmail.com>
The /etc/SuSE-release file was deprecated in older SUSE versions and as of openSUSE/SLES 15.X is no longer present on these systems. This changes the detection methods to use /etc/os-release which should be present on new as well as older systems. Signed-off-by: Russell Cardullo <russellcardullo@gmail.com>
/etc/os-release is definitely the preferred detection place, but I believe SLES 11 doesn't have this file so this would break SLES 11 detection. |
@tas50 thanks, agreed we definitely shouldn’t break versions without that file. I think I can add back the old detection as a fallback and will test that out. |
Take a look at how we're doing this in Ohai. It starts with /etc/os-release and falls back to all the old configs. https://github.com/chef/ohai/blob/master/lib/ohai/plugins/linux/platform.rb |
Older versions of SUSE won't have the /etc/os-release file so fallback to the /etc/SuSE-release file in those cases. Signed-off-by: Russell Cardullo <russellcardullo@gmail.com>
@tas50 I added the fallback code back in which will get used when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to merge at this point with a rebase.
Thanks @russellcardullo for this PR! I've adopted it as #505, and performed a rebase - should be merged shortly. Thanks again! |
Description
The file
/etc/SuSE-release
was deprecated in older SUSE versions and as of SUSE/SLES 15.X is no longer present. This switches the detection to use the values in/etc/os-release
.Related Issue
#377
Types of changes
Checklist: