Commit f9ddd0f6 authored by Vitaly Lipatov's avatar Vitaly Lipatov

distr_info: move distro detection code to fill_distr_info

parent aba127ba
...@@ -242,6 +242,8 @@ normalize_name() ...@@ -242,6 +242,8 @@ normalize_name()
esac esac
} }
fill_distr_info()
{
# Default values # Default values
PRETTY_NAME="" PRETTY_NAME=""
DISTRIB_ID="" DISTRIB_ID=""
...@@ -269,6 +271,10 @@ elif distro lsb-release ; then ...@@ -269,6 +271,10 @@ elif distro lsb-release ; then
PRETTY_NAME=$(cat $DISTROFILE | get_var DISTRIB_DESCRIPTION) PRETTY_NAME=$(cat $DISTROFILE | get_var DISTRIB_DESCRIPTION)
fi fi
# TODO:
#if [ -n "$DISTRIB_ID" ] ; then
# # don't check obsoleted ways
# ;
# ALT Linux based # ALT Linux based
if distro altlinux-release ; then if distro altlinux-release ; then
DISTRIB_ID="ALTLinux" DISTRIB_ID="ALTLinux"
...@@ -483,7 +489,9 @@ fi ...@@ -483,7 +489,9 @@ fi
if [ -z "$PRETTY_NAME" ] ; then if [ -z "$PRETTY_NAME" ] ; then
PRETTY_NAME="$DISTRIB_ID $DISTRIB_RELEASE" PRETTY_NAME="$DISTRIB_ID $DISTRIB_RELEASE"
fi fi
}
fill_distr_info
get_uname() get_uname()
{ {
......
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