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 couple of OS detection issues #3165

Merged
merged 2 commits into from Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 0 additions & 11 deletions usr/share/rear/init/default/005_verify_os_conf.sh

This file was deleted.

6 changes: 4 additions & 2 deletions usr/share/rear/lib/config-functions.sh
Expand Up @@ -25,8 +25,10 @@ function SetOSVendorAndVersion () {
grep -q -i 'debian' /etc/os-release && OS_VENDOR=Debian
grep -q -i -E '(ubuntu|linuxmint)' /etc/os-release && OS_VENDOR=Ubuntu
grep -q -i 'arch' /etc/os-release && OS_VENDOR=Arch
local version_id=$(grep "^VERSION_ID=" /etc/os-release | cut -d\" -f2 ) # 7
contains_visible_char "$version_id" && OS_VERSION="$version_id"

local VERSION_ID
eval "$(grep "^VERSION_ID=" /etc/os-release)"
contains_visible_char "$VERSION_ID" && OS_VERSION="$VERSION_ID"
fi

# For non-systemd distro's try the /etc/system-release file
Expand Down