Changeset 3707 in MondoRescue for branches/3.3/contrib/pbtest
- Timestamp:
- Apr 13, 2018, 1:35:12 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/contrib/pbtest
r3700 r3707 1 1 #!/bin/bash 2 # Test a remote machine such as Fedora 202 # Test a remote machine such as Fedora, RHEL, SLES 3 3 # 4 4 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 6 7 DISTRO=rhel-7-x86_64 7 8 #DISTRO=rhel-5-x86_64 8 9 #DISTRO=fedora-20-x86_64 10 #DISTRO=sles-12-x86_64 9 11 10 12 NAME=`pbdistrocheck $DISTRO | grep -E '^Name:' | awk '{print $2}'` … … 25 27 pb -p mondorescue -r branches/3.3 -m $D sbx2vm MondoRescue mondo mindi mindi-busybox 26 28 cat > /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 # 31 if [ $NAME = "rhel" ]; then 32 REPODIR="/etc/yum.repos.d" 33 REPOCMD="yum" 34 elif [ $NAME = "sles" ]; then 35 REPODIR="/etc/zypp/repos.d" 36 REPOCMD="zypper" 37 fi 38 \$REPOCMD install -y curl 39 cd \$REPODIR 40 if [ ! -f \$REPODIR/mondorescue.repo ]; then 30 41 curl ftp://ftp.mondorescue.org/$NAME/$VER/$ARCH/mondorescue.repo -o mondorescue.repo 31 42 fi 32 if [ ! -f /etc/yum.repos.d/mondorescue-test.repo ]; then43 if [ ! -f \$REPODIR/mondorescue-test.repo ]; then 33 44 curl ftp://ftp.mondorescue.org/test/$NAME/$VER/$ARCH/mondorescue-test.repo -o mondorescue-test.repo 34 45 fi 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 46 if [ $NAME = "rhel" ]; then 47 \$REPOCMD makecache fast 48 elif [ $NAME = "sles" ]; then 49 \$REPOCMD ref 50 fi 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 39 56 modprobe nfsv3 40 57 mount -o vers=3 10.0.2.2:$DEST $MNT … … 48 65 ssh -i $KEY -p $port root@localhost "rm -rf ./test" 49 66 scp -i $KEY -P $port /tmp/test root@localhost: 50 ssh -i $KEY -p $port root@localhost "chmod 755 ./test ; ./test"67 ssh -i $KEY -p $port root@localhost "chmod 755 ./test ; sh -x ./test" 51 68 52 69 sudo chown bruno $DEST/temp
Note:
See TracChangeset
for help on using the changeset viewer.