Commit c6d64645 authored by Vitaly Lipatov's avatar Vitaly Lipatov

distr_info: fix fill VENDOR_ID

parent 5fa1e195
......@@ -421,10 +421,10 @@ if distro os-release ; then
*)
if [ -n "$ID_LIKE" ] ; then
# ID_LIKE can be 'rhel centos fedora', use first word
VENDOR_ID="$(echo "$ID_LIKE" | firstword)"
VENDOR_ID="$(firstword "$ID_LIKE")"
# use latest word for versions like Fedora has
if is_numeric "$DISTRIB_RELEASE" && [ "$DISTRIB_RELEASE" -ge 20 ] ; then
VENDOR_ID="$(echo "$ID_LIKE" | lastword)"
VENDOR_ID="$(lastword "$ID_LIKE")"
fi
if [ "$VENDOR_ID" = "debian" ] && [ -n "$DEBIAN_CODENAME" ] ; then
DISTRIB_CODENAME="$DEBIAN_CODENAME"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment