Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Support ID_LIKE in /etc/os-release if it exists #286

Merged
merged 2 commits into from
Apr 25, 2023

Conversation

codyro
Copy link
Contributor

@codyro codyro commented Apr 11, 2023

  • Useful for unsupported distributions based on supported distributions

An example use case is we utilize CloudLinux for a handful of servers, a commercial distribution based on RHEL. Since CloudLinux isn't supported by OpenNebula officially, it breaks some context functions, such as the network, due to how OS detection works.

This change proposes the detect_os function used to determine which OS it's the script is being run on and also sends along the ID_LIKE variable in the /etc/os-release file if it exists. Then we can loop over the ID_LIKE distributions to see if anything matches if the ID field doesn't match a supported OS.

No other context scripts rely on the detect_os helper function, so it should be safe to adjust what it returns without breaking other context scripts.

 - Useful for unsupported distributions based off supported distributions

Signed-off-by: Cody Robertson <[email protected]>
@rsmontero rsmontero added this to the Release 6.6.1 milestone Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants