Last change
on this file since 2398 was 1535, checked in by Bruno Cornec, 17 years ago |
Use the configuration files in mondo (begining). That revision doesn't even compile.
|
-
Property svn:executable
set to
*
|
File size:
1.1 KB
|
Rev | Line | |
---|
[1334] | 1 | #!/bin/bash
|
---|
| 2 | #
|
---|
| 3 | # $Id$
|
---|
| 4 | #
|
---|
| 5 | # Test mondo in a virtual machine with qemu
|
---|
| 6 | #
|
---|
| 7 |
|
---|
| 8 | (
|
---|
| 9 | dname=`dirname $0`
|
---|
| 10 | prem=`echo $dname |cut -c1`
|
---|
| 11 | if [ _${prem} = _"/" ]; then
|
---|
| 12 | export TOOLHOME=$dname
|
---|
| 13 | else
|
---|
| 14 | export TOOLHOME=${PWD}/$dname
|
---|
| 15 | fi
|
---|
| 16 |
|
---|
| 17 | . $TOOLHOME/common-env
|
---|
| 18 | . $TOOLHOME/distro-env
|
---|
| 19 | . $TOOLHOME/qemu-env
|
---|
| 20 |
|
---|
| 21 | if [ _"$1" = _"" ]; then
|
---|
| 22 | echo "Syntax: backupqemu vm"
|
---|
| 23 | exit -1
|
---|
| 24 | else
|
---|
| 25 | m=$1
|
---|
| 26 | fi
|
---|
| 27 |
|
---|
| 28 | demodir=/home/bruno/demo-mondo
|
---|
| 29 | h=test-mondo
|
---|
| 30 |
|
---|
| 31 | cat > $TMPDIR/test-mondo << EOF
|
---|
| 32 | #!/bin/bash
|
---|
| 33 |
|
---|
| 34 | d=/users/svg
|
---|
[1535] | 35 | mkdir -p \$d/images
|
---|
| 36 | mount ${iph}:$demodir \$d/images
|
---|
| 37 | mkdir -p \$d/tmp-$h \$d/scratch-$h
|
---|
| 38 | /usr/sbin/mondoarchive -n ${iph}:$demodir -G -F -N -O -E "/usr/share/doc /usr/src /home /users /var/log" -d images -s 650m -T \$d/tmp-$h -S \$d/scratch-$h -p $h-$m
|
---|
| 39 | umount \$d/images
|
---|
[1334] | 40 | EOF
|
---|
| 41 | chmod 755 $TMPDIR/test-mondo
|
---|
| 42 | scp -P $sp $TMPDIR/test-mondo bruno@localhost:
|
---|
| 43 | ssh -p $sp localhost "export PATH=/sbin:/usr/sbin:$PATH ; sudo ./test-mondo"
|
---|
| 44 |
|
---|
| 45 | mkdir -p $demodir/mnt
|
---|
| 46 | sudo mount -o loop $demodir/images/$h-$m-1.iso $demodir/mnt
|
---|
| 47 | sudo cp $demodir/mnt/vmlinuz $demodir/k
|
---|
| 48 | sudo cp $demodir/mnt/initrd.img $demodir/i
|
---|
| 49 | sudo umount $demodir/mnt
|
---|
| 50 | ) 2>&1 | tee /tmp/backupqemu.log
|
---|
Note:
See
TracBrowser
for help on using the repository browser.