Changeset 3717 in MondoRescue
- Timestamp:
- Aug 13, 2019, 11:20:03 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/contrib/pbtest
r3707 r3717 5 5 # On RHEL 7.3+ 6 6 # 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 7 12 DISTRO=rhel-7-x86_64 8 13 #DISTRO=rhel-5-x86_64 9 14 #DISTRO=fedora-20-x86_64 10 #DISTRO=sles-12-x86_6411 15 12 16 NAME=`pbdistrocheck $DISTRO | grep -E '^Name:' | awk '{print $2}'` … … 18 22 TEMP=temp 19 23 CACHE=cache 20 MNT=/mnt 24 MNT=/mnt2 21 25 KEY=$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" == _"" ]; then26 PORT=`ps auxww | grep qemu | grep -w $D | grep -v grep | perl -p -e 's|.*127.0.0.1:([0-9]+)-:.*|$1|'` 27 if [ _"$PORT" == _"" ]; then 24 28 pb -p mondorescue -r branches/3.3 -m $D launchvm 25 29 fi … … 55 59 \$REPOCMD update -y mondo mindi perl-MondoRescue mindi-busybox 56 60 modprobe nfsv3 61 mkdir -p $MNT 57 62 mount -o vers=3 10.0.2.2:$DEST $MNT 58 63 mkdir -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/$TEMP64 mondoarchive -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 60 65 umount $MNT/ 61 66 EOF 62 67 # 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|'`68 PORT=`ps auxww | grep qemu | grep -w $D | grep -v grep | perl -p -e 's|.*127.0.0.1:([0-9]+)-:.*|$1|'` 64 69 65 ssh -i $KEY -p $ portroot@localhost "rm -rf ./test"66 scp -i $KEY -P $ port/tmp/test root@localhost:67 ssh -i $KEY -p $ portroot@localhost "chmod 755 ./test ; sh -x ./test"70 ssh -i $KEY -p $PORT root@localhost "rm -rf ./test" 71 scp -i $KEY -P $PORT /tmp/test root@localhost: 72 ssh -i $KEY -p $PORT root@localhost "chmod 755 ./test ; sh -x ./test" 68 73 69 74 sudo chown bruno $DEST/temp
Note:
See TracChangeset
for help on using the changeset viewer.