Commit a46b587c authored by Vitaly Lipatov's avatar Vitaly Lipatov

distr_info fix support for ROSAFresh

parent 22b655a0
...@@ -120,9 +120,17 @@ case $DISTRIB_ID in ...@@ -120,9 +120,17 @@ case $DISTRIB_ID in
CMD="urpm-rpm" CMD="urpm-rpm"
;; ;;
ROSA) ROSA)
CMD="dnf-rpm" CMD="urpm-rpm"
hascommand dnf || CMD="yum-rpm" hascommand yum && CMD="yum-rpm"
[ "$DISTRIB_ID/$DISTRIB_RELEASE" = "ROSA/2020" ] && CMD="urpm-rpm" hascommand dnf && CMD="dnf-rpm"
#[ "$DISTRIB_ID/$DISTRIB_RELEASE" = "ROSA/2020" ] && CMD="urpm-rpm"
;;
ROSAFresh)
CMD="urpm-rpm"
hascommand yum && CMD="yum-rpm"
hascommand dnf && CMD="dnf-rpm"
# use dnf since 2020
#[ "$DISTRIB_ID/$DISTRIB_RELEASE" = "ROSA/2020" ] && CMD="urpm-rpm"
;; ;;
FreeBSD|NetBSD|OpenBSD|Solaris) FreeBSD|NetBSD|OpenBSD|Solaris)
CMD="pkgsrc" CMD="pkgsrc"
...@@ -183,12 +191,12 @@ case $DISTRIB_ID in ...@@ -183,12 +191,12 @@ case $DISTRIB_ID in
echo "apt-dpkg" && return echo "apt-dpkg" && return
fi fi
if hascommand "rpm" && [ -s /var/lib/rpm/Name ] ; then if hascommand "rpm" && [ -s /var/lib/rpm/Name ] || [ -s /var/lib/rpm/rpmdb.sqlite ] ; then
hascommand "zypper" && echo "zypper-rpm" && return hascommand "zypper" && echo "zypper-rpm" && return
hascommand "dnf" && echo "dnf-rpm" && return hascommand "dnf" && echo "dnf-rpm" && return
hascommand "apt-get" && echo "apt-rpm" && return hascommand "apt-get" && echo "apt-rpm" && return
hascommand "yum" && echo "yum-rpm" && return hascommand "yum" && echo "yum-rpm" && return
hascommand "urpmi" && echo "urpmi-rpm" && return hascommand "urpmi" && echo "urpm-rpm" && return
fi fi
if hascommand "dpkg" && [ -s /var/lib/dpkg/status ] ; then if hascommand "dpkg" && [ -s /var/lib/dpkg/status ] ; then
...@@ -272,6 +280,9 @@ normalize_name() ...@@ -272,6 +280,9 @@ normalize_name()
"Red Hat Enterprise Linux Server") "Red Hat Enterprise Linux Server")
echo "RHEL" echo "RHEL"
;; ;;
"ROSA Fresh"*|"ROSA Desktop Fresh"*)
echo "ROSAFresh"
;;
"ROSA Chrome Desktop") "ROSA Chrome Desktop")
echo "ROSA" echo "ROSA"
;; ;;
...@@ -413,6 +424,9 @@ case "$DISTRIB_ID" in ...@@ -413,6 +424,9 @@ case "$DISTRIB_ID" in
DISTRIB_RELEASE="Sisyphus" DISTRIB_RELEASE="Sisyphus"
DISTRIB_CODENAME="$DISTRIB_RELEASE" DISTRIB_CODENAME="$DISTRIB_RELEASE"
;; ;;
"ROSAFresh")
DISTRIB_CODENAME="$DISTRIB_RELEASE"
;;
esac esac
......
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