Changeset 3707 in MondoRescue for branches/3.3/contrib/pbtest


Ignore:
Timestamp:
Apr 13, 2018, 1:35:12 AM (6 years ago)
Author:
Bruno Cornec
Message:

Update pbtest to latest version with SLES support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/contrib/pbtest

    r3700 r3707  
    11#!/bin/bash
    2 # Test a remote machine such as Fedora 20
     2# Test a remote machine such as Fedora, RHEL, SLES
    33#
    44
    5 #DISTRO=rhel-6.2-x86_64
     5# On RHEL 7.3+
     6# for ssh access edit pam.d files to avoid root login by ssh to fail with uid < 1000
    67DISTRO=rhel-7-x86_64
    78#DISTRO=rhel-5-x86_64
    89#DISTRO=fedora-20-x86_64
     10#DISTRO=sles-12-x86_64
    911
    1012NAME=`pbdistrocheck $DISTRO | grep -E '^Name:' | awk '{print $2}'`
     
    2527pb -p mondorescue -r branches/3.3 -m $D sbx2vm MondoRescue mondo mindi mindi-busybox
    2628cat > /tmp/test << EOF
    27 cd /etc/yum.repos.d
    28 yum install -y curl
    29 if [ ! -f /etc/yum.repos.d/mondorescue.repo ]; then
     29#!/bin/bash
     30#
     31if [ $NAME = "rhel" ]; then
     32    REPODIR="/etc/yum.repos.d"
     33    REPOCMD="yum"
     34elif [ $NAME = "sles" ]; then
     35    REPODIR="/etc/zypp/repos.d"
     36    REPOCMD="zypper"
     37fi
     38\$REPOCMD install -y curl
     39cd \$REPODIR
     40if [ ! -f \$REPODIR/mondorescue.repo ]; then
    3041    curl ftp://ftp.mondorescue.org/$NAME/$VER/$ARCH/mondorescue.repo -o mondorescue.repo
    3142fi
    32 if [ ! -f /etc/yum.repos.d/mondorescue-test.repo ]; then
     43if [ ! -f \$REPODIR/mondorescue-test.repo ]; then
    3344    curl ftp://ftp.mondorescue.org/test/$NAME/$VER/$ARCH/mondorescue-test.repo -o mondorescue-test.repo
    3445fi
    35 yum makecache fast
    36 yum install mondo -y
    37 yum update mondo mindi perl-MondoRescue mindi-busybox -y
    38 yum install nfs-utils -y
     46if [ $NAME = "rhel" ]; then
     47    \$REPOCMD makecache fast
     48elif [ $NAME = "sles" ]; then
     49    \$REPOCMD ref
     50fi
     51\$REPOCMD install -y nfs-utils
     52# To take test repo first do it that way
     53\$REPOCMD install -y mindi
     54\$REPOCMD install -y mondo
     55\$REPOCMD update -y mondo mindi perl-MondoRescue mindi-busybox
    3956modprobe nfsv3
    4057mount -o vers=3 10.0.2.2:$DEST $MNT
     
    4865ssh -i $KEY -p $port root@localhost "rm -rf ./test"
    4966scp -i $KEY -P $port /tmp/test root@localhost:
    50 ssh -i $KEY -p $port root@localhost "chmod 755 ./test ; ./test"
     67ssh -i $KEY -p $port root@localhost "chmod 755 ./test ; sh -x ./test"
    5168
    5269sudo chown bruno $DEST/temp
Note: See TracChangeset for help on using the changeset viewer.