Commit 58b09022 authored by Vitaly Lipatov's avatar Vitaly Lipatov

distr_info: add AstraLinux support

parent e3a6466c
...@@ -29,6 +29,7 @@ has() ...@@ -29,6 +29,7 @@ has()
rpmvendor() rpmvendor()
{ {
[ "$DISTRIB_ID" = "ALTLinux" ] && echo "alt" && return [ "$DISTRIB_ID" = "ALTLinux" ] && echo "alt" && return
[ "$DISTRIB_ID" = "AstraLinux" ] && echo "astra" && return
[ "$DISTRIB_ID" = "LinuxXP" ] && echo "lxp" && return [ "$DISTRIB_ID" = "LinuxXP" ] && echo "lxp" && return
[ "$DISTRIB_ID" = "TinyCoreLinux" ] && echo "tcl" && return [ "$DISTRIB_ID" = "TinyCoreLinux" ] && echo "tcl" && return
echo "$DISTRIB_ID" | tr "[A-Z]" "[a-z]" echo "$DISTRIB_ID" | tr "[A-Z]" "[a-z]"
...@@ -55,7 +56,7 @@ pkgtype() ...@@ -55,7 +56,7 @@ pkgtype()
alpine) echo "apk" ;; alpine) echo "apk" ;;
tinycorelinux) echo "tcz" ;; tinycorelinux) echo "tcz" ;;
cygwin) echo "tar.xz" ;; cygwin) echo "tar.xz" ;;
debian|ubuntu|mint|runtu|mcst) echo "deb" ;; debian|ubuntu|mint|runtu|mcst|astra) echo "deb" ;;
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles) alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles)
echo "rpm" ;; echo "rpm" ;;
fedora|redhat|scientific|centos|rhel) fedora|redhat|scientific|centos|rhel)
...@@ -79,11 +80,13 @@ get_major_version() ...@@ -79,11 +80,13 @@ get_major_version()
# Default values # Default values
DISTRIB_ID="Generic" DISTRIB_ID="Generic"
DISTRIB_RELEASE="" DISTRIB_RELEASE=""
DISTRIB_CODENAME=""
# Default with LSB # Default with LSB
if distro lsb-release ; then if distro lsb-release ; then
DISTRIB_ID=`cat $DISTROFILE | get_var DISTRIB_ID` DISTRIB_ID=`cat $DISTROFILE | get_var DISTRIB_ID`
DISTRIB_RELEASE=`cat $DISTROFILE | get_var DISTRIB_RELEASE` DISTRIB_RELEASE=`cat $DISTROFILE | get_var DISTRIB_RELEASE`
DISTRIB_CODENAME=`cat $DISTROFILE | get_var DISTRIB_CODENAME`
fi fi
# ALT Linux based # ALT Linux based
...@@ -155,6 +158,12 @@ elif distro mcst_version ; then ...@@ -155,6 +158,12 @@ elif distro mcst_version ; then
DISTRIB_ID="MCST" DISTRIB_ID="MCST"
DISTRIB_RELEASE=$(cat "$DISTROFILE" | grep "release" | sed -e "s|.*release \([0-9]*\).*|\1|g") DISTRIB_RELEASE=$(cat "$DISTROFILE" | grep "release" | sed -e "s|.*release \([0-9]*\).*|\1|g")
elif distro astra_version ; then
#DISTRIB_ID=`cat $DISTROFILE | get_var DISTRIB_ID`
DISTRIB_ID="AstraLinux"
#DISTRIB_RELEASE=$(cat "$DISTROFILE" | head -n1 | sed -e "s|.* \([a-z]*\).*|\1|g")
DISTRIB_RELEASE=$DISTRIB_CODENAME
# for Ubuntu use standard LSB info # for Ubuntu use standard LSB info
elif [ "$DISTRIB_ID" = "Ubuntu" ] && [ -n "$DISTRIB_RELEASE" ]; then elif [ "$DISTRIB_ID" = "Ubuntu" ] && [ -n "$DISTRIB_RELEASE" ]; then
# use LSB version # use LSB version
......
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