]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps.sh: Fixes for RHEL 7
authorZack Cerza <zack@redhat.com>
Fri, 1 Feb 2019 00:36:17 +0000 (00:36 +0000)
committerNathan Cutler <ncutler@suse.com>
Fri, 4 Oct 2019 09:13:25 +0000 (11:13 +0200)
Signed-off-by: Zack Cerza <zack@redhat.com>
(cherry picked from commit a1a3e7960cf2c792ac8c9c71e68caa0ebada8933)

Conflicts:
install-deps.sh

install-deps.sh

index 1f31eba751306c58d139166d53193900e38033fb..e609755636db13689c65a09e36b49b8dbc895aa2 100755 (executable)
@@ -215,15 +215,16 @@ else
                 fi
                 ;;
             centos|rhel|ol|virtuozzo)
+                MAJOR_VERSION="$(echo $VERSION_ID | cut -d. -f1)"
                 $SUDO yum install -y yum-utils
                 if test $ID = rhel ; then
-                    $SUDO yum-config-manager --enable rhel-$VERSION_ID-server-optional-rpms
+                    $SUDO yum-config-manager --enable rhel-$MAJOR_VERSION-server-optional-rpms
                 fi
-                $SUDO yum-config-manager --add-repo https://dl.fedoraproject.org/pub/epel/$VERSION_ID/x86_64/
+                $SUDO yum-config-manager --add-repo https://dl.fedoraproject.org/pub/epel/$MAJOR_VERSION/x86_64/
                 $SUDO yum install --nogpgcheck -y epel-release
-                $SUDO rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$VERSION_ID
+                $SUDO rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$MAJOR_VERSION
                 $SUDO rm -f /etc/yum.repos.d/dl.fedoraproject.org*
-                if test $ID = centos -a $VERSION_ID = 7 ; then
+                if test $ID = centos -a $MAJOR_VERSION = 7 ; then
                    $SUDO $yumdnf install -y python36-devel
                    case $(uname -m) in
                        x86_64)