Changeset 3717


Ignore:
Timestamp:
Aug 13, 2019, 11:20:03 PM (8 days ago)
Author:
bruno
Message:

minor pbtest improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/contrib/pbtest

    r3707 r3717  
    55# On RHEL 7.3+
    66# for ssh access edit pam.d files to avoid root login by ssh to fail with uid < 1000
     7# Install on it perl perl-Data-Dumper and perl-YAML
     8# setup that VM with pb -p pb -m $DISTRO sbx2setupvm
     9# setup that VM after with pb -p mondorescue -m $DISTRO prepvm
     10#
     11#DISTRO=sles-12-x86_64
    712DISTRO=rhel-7-x86_64
    813#DISTRO=rhel-5-x86_64
    914#DISTRO=fedora-20-x86_64
    10 #DISTRO=sles-12-x86_64
    1115
    1216NAME=`pbdistrocheck $DISTRO | grep -E '^Name:' | awk '{print $2}'`
     
    1822TEMP=temp
    1923CACHE=cache
    20 MNT=/mnt
     24MNT=/mnt2
    2125KEY=$HOME/.ssh/pb_rsa
    22 port=`ps auxww | grep qemu | grep -w $D | grep -v grep | perl -p -e 's|.*127.0.0.1:([0-9]+)-:.*|$1|'`
    23 if [ _"$port" == _"" ]; then
     26PORT=`ps auxww | grep qemu | grep -w $D | grep -v grep | perl -p -e 's|.*127.0.0.1:([0-9]+)-:.*|$1|'`
     27if [ _"$PORT" == _"" ]; then
    2428    pb -p mondorescue -r branches/3.3 -m $D launchvm
    2529fi
     
    5559\$REPOCMD update -y mondo mindi perl-MondoRescue mindi-busybox
    5660modprobe nfsv3
     61mkdir -p $MNT
    5762mount -o vers=3 10.0.2.2:$DEST $MNT
    5863mkdir -p $MNT/$DIR $MNT/$TEMP $MNT/$CACHE
    59 mondoarchive -N -G -K 99 -E '/home|/var/log|/usr/share/doc|/usr/src|/usr/share/texmf|/mnt' -s 4480m -n 10.0.2.2:$DEST -d $DIR -p $D -z -O -S $MNT/$CACHE -T $MNT/$TEMP
     64mondoarchive -N -G -K 99 -E '/home|/var/log|/usr/share/doc|/usr/src|/usr/share/texmf|/mnt|/mnt2' -s 4480m -n 10.0.2.2:$DEST -d $DIR -p $D -z -O -S $MNT/$CACHE -T $MNT/$TEMP
    6065umount $MNT/
    6166EOF
    6267# Now should be OK
    63 port=`ps auxww | grep qemu | grep -w $D | grep -v grep | perl -p -e 's|.*127.0.0.1:([0-9]+)-:.*|$1|'`
     68PORT=`ps auxww | grep qemu | grep -w $D | grep -v grep | perl -p -e 's|.*127.0.0.1:([0-9]+)-:.*|$1|'`
    6469
    65 ssh -i $KEY -p $port root@localhost "rm -rf ./test"
    66 scp -i $KEY -P $port /tmp/test root@localhost:
    67 ssh -i $KEY -p $port root@localhost "chmod 755 ./test ; sh -x ./test"
     70ssh -i $KEY -p $PORT root@localhost "rm -rf ./test"
     71scp -i $KEY -P $PORT /tmp/test root@localhost:
     72ssh -i $KEY -p $PORT root@localhost "chmod 755 ./test ; sh -x ./test"
    6873
    6974sudo chown bruno $DEST/temp
Note: See TracChangeset for help on using the changeset viewer.