glusterfs8.sh 733 Bytes
Newer Older
1 2 3 4
#!/bin/sh

[ "$1" != "--run" ] && echo "Install glusterfs8 (or upgrade from glusterfs7)" && exit

5
distro="$($DISTRVENDOR -d)" ; [ "$distro" = "ALTLinux" ] || [ "$distro" = "ALTServer" ] || { echo "Only ALTLinux is supported" ; exit 1 ; }
6 7 8 9 10 11 12

GFSOLD=glusterfs7
GFSNEW=glusterfs8

if epmqp --quiet ${GFSOLD}- ; then
    # Upgrade if was installed
    epmi $(epmqp --short $GFSOLD | grep -v rdma | sed -e "s|$GFSOLD|$GFSNEW|") ${GFSOLD}- ${GFSOLD}-client- python3-module-${GFSOLD}-
13
    epm installed $GFSNEW-server && serv glusterd on
14 15
else
    # Install all packages
16
    epmi ${GFSNEW}-cli ${GFSNEW}-client ${GFSNEW} || exit
17

Vitaly Lipatov's avatar
Vitaly Lipatov committed
18
    echo "You can install also '${GFSNEW}-server' if it is needed for this host"
19 20 21

    epme $(epmqp ${GFSOLD})
fi