Commit 8c4db57e authored by Vitaly Lipatov's avatar Vitaly Lipatov

use external distro_info if internal distr_info is missed

parent 1b40406c
...@@ -66,7 +66,7 @@ $(get_help HELPOPT) ...@@ -66,7 +66,7 @@ $(get_help HELPOPT)
print_version() print_version()
{ {
echo "EPM package manager version @VERSION@" echo "EPM package manager version @VERSION@"
echo "Running on $($DISTRVENDOR) ('$PMTYPE' package manager uses '$PKGFORMAT' package format)" echo "Running on $($DISTRVENDOR -e) ('$PMTYPE' package manager uses '$PKGFORMAT' package format)"
echo "Copyright (c) Etersoft 2012-2019" echo "Copyright (c) Etersoft 2012-2019"
echo "This program may be freely redistributed under the terms of the GNU AGPLv3." echo "This program may be freely redistributed under the terms of the GNU AGPLv3."
} }
......
...@@ -464,8 +464,11 @@ set_pm_type() ...@@ -464,8 +464,11 @@ set_pm_type()
{ {
local CMD local CMD
# Fill for use: PMTYPE, DISTRNAME, DISTRVERSION, PKGFORMAT, PKGVENDOR, RPMVENDOR # use external distro_info if internal one is missed
DISTRVENDOR=$PROGDIR/distr_info DISTRVENDOR=$PROGDIR/distr_info
[ -x $DISTRVENDOR ] || DISTRVENDOR=distro_info
# Fill for use: PMTYPE, DISTRNAME, DISTRVERSION, PKGFORMAT, PKGVENDOR, RPMVENDOR
[ -n "$DISTRNAME" ] || DISTRNAME=$($DISTRVENDOR -d) || fatal "Can't get distro name." [ -n "$DISTRNAME" ] || DISTRNAME=$($DISTRVENDOR -d) || fatal "Can't get distro name."
[ -n "$DISTRVERSION" ] || DISTRVERSION=$($DISTRVENDOR -v) [ -n "$DISTRVERSION" ] || DISTRVERSION=$($DISTRVENDOR -v)
set_target_pkg_env set_target_pkg_env
......
...@@ -48,9 +48,12 @@ set_service_type() ...@@ -48,9 +48,12 @@ set_service_type()
{ {
local CMD local CMD
# Fill for use: PMTYPE, DISTRNAME, DISTRVERSION, PKGFORMAT, PKGVENDOR, RPMVENDOR # use external distro_info if internal one is missed
DISTRVENDOR=$PROGDIR/distr_info DISTRVENDOR=$PROGDIR/distr_info
[ -n "$DISTRNAME" ] || DISTRNAME=$($DISTRVENDOR -d) || fatal "Can't get distro name." [ -x $DISTRVENDOR ] || DISTRVENDOR=distro_info
# Fill for use: PMTYPE, DISTRNAME, DISTRVERSION, PKGFORMAT, PKGVENDOR, RPMVENDOR
[ -n "$DISTRNAME" ] || DISTRNAME=$($DISTRVENDOR -d) || fatal "Can't get distro name from $DISTRVENDOR."
[ -n "$DISTRVERSION" ] || DISTRVERSION=$($DISTRVENDOR -v) [ -n "$DISTRVERSION" ] || DISTRVERSION=$($DISTRVENDOR -v)
set_target_pkg_env set_target_pkg_env
...@@ -139,7 +142,7 @@ print_version() ...@@ -139,7 +142,7 @@ print_version()
local virt="$(detect_virt)" local virt="$(detect_virt)"
[ "$virt" = "none" ] || [ "$virt" = "" ] || on_text="(under $virt)" [ "$virt" = "none" ] || [ "$virt" = "" ] || on_text="(under $virt)"
echo "Service manager version @VERSION@" echo "Service manager version @VERSION@"
echo "Running on $($DISTRVENDOR) $on_text with $SERVICETYPE" echo "Running on $($DISTRVENDOR -e) $on_text with $SERVICETYPE"
echo "Copyright (c) Etersoft 2012-2019" echo "Copyright (c) Etersoft 2012-2019"
echo "This program may be freely redistributed under the terms of the GNU AGPLv3." echo "This program may be freely redistributed under the terms of the GNU AGPLv3."
} }
......
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