Commit fef8ae0c authored by Vitaly Lipatov's avatar Vitaly Lipatov

distr_info: add ID_LIKE support and small fixes

parent fcf03988
......@@ -314,6 +314,9 @@ normalize_name()
"ROSA Chrome Desktop")
echo "ROSA"
;;
"MOS Desktop")
echo "ROSA"
;;
"ROSA Enterprise Linux Desktop")
echo "RELS"
;;
......@@ -372,6 +375,7 @@ if distro os-release ; then
# set by os-release:
#PRETTY_NAME
VENDOR_ID="$ID"
[ -n "$ID_LIKE" ] && VENDOR_ID="$ID_LIKE"
DISTRIB_FULL_RELEASE="$DISTRIB_RELEASE"
DISTRIB_CODENAME="$VERSION_CODENAME"
......@@ -420,14 +424,17 @@ case "$DISTRIB_ID" in
echo "$VERSION" | grep -q "c9.* branch" && DISTRIB_RELEASE="c9"
echo "$VERSION" | grep -q "c9f1 branch" && DISTRIB_RELEASE="c9f1"
echo "$VERSION" | grep -q "c9f2 branch" && DISTRIB_RELEASE="c9f2"
echo "$VERSION" | grep -q "c9f3 branch" && DISTRIB_RELEASE="c9f3"
DISTRIB_CODENAME="$DISTRIB_RELEASE"
# FIXME: fast hack for fallback: 10.1 -> p10 for /etc/os-release
if echo "$DISTRIB_RELEASE" | grep -q "^[0-9]" && echo "$DISTRIB_RELEASE" | grep -q -v "[0-9][0-9][0-9]" ; then
DISTRIB_RELEASE="$(echo p$DISTRIB_RELEASE | sed -e 's|\..*||')"
DISTRIB_CODENAME="$DISTRIB_RELEASE"
DISTRIB_CODENAME="$(echo p$DISTRIB_RELEASE | sed -e 's|\..*||')"
# TODO: change p10 to 10
DISTRIB_RELEASE="$DISTRIB_CODENAME"
fi
;;
"ALTServer")
DISTRIB_ID="ALTLinux"
DISTRIB_CODENAME="$(echo p$DISTRIB_RELEASE | sed -e 's|\..*||')"
;;
"ALTSPWorkstation")
......@@ -453,7 +460,7 @@ case "$DISTRIB_ID" in
DISTRIB_RELEASE="Sisyphus"
DISTRIB_CODENAME="$DISTRIB_RELEASE"
;;
"ROSA")
"ROSA"|"MOSDesktop")
DISTRIB_FULL_RELEASE="$DISTRIB_CODENAME"
DISTRIB_CODENAME="$DISTRIB_RELEASE"
;;
......
# Standard values
# Specification: https://www.freedesktop.org/software/systemd/man/os-release.html
NAME="MOS Desktop"
ID=mos
ID_LIKE=rosa
PRETTY_NAME="MOS Desktop 12"
CPE_NAME="cpe:/o:mos:rosa:2021.1"
META_CLASS=desktop
VARIANT_ID=mos-desktop
ANSI_COLOR="1;43"
VERSION="12"
VERSION_ID=2021.1
VERSION_CODENAME=12
HOME_URL="http://os.mos.ru"
LOGO=mos
BUG_REPORT_URL="https://os.mos.ru/git"
# ROSA-specific values
ROSA_OS_BRANCH=mos
ROSA_OS_PLATFORM="rosa2021.1"
ROSA_OS_PLATFORM_INTEGER=202110
ROSA_OS_TYPE=desktop
ROSA_OS_VERSION=12
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