Ignore:
Timestamp:
May 19, 2006, 12:37:53 AM (14 years ago)
Author:
bcornec
Message:

mondo-doc should now generate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/tools/mkqemu

    r553 r556  
    33# $Id$
    44#
    5 # Script build packages on various distributions with qemu
     5# Call virtual machine with qemu
    66#
    77
    88if [ _"$1" == _"" ]; then
    9     echo "Syntax: build2qemu [version-tag [vm1]..|vmx]] )"
     9    echo "Syntax: qemu vm"
    1010    exit -1
     11else
     12    m=$1
    1113fi
    12 
    13 . $TOOLHOME/common-env
    14 . $TOOLHOME/distro-env
    15 
    16 # We need to get $VER and $TAG
    17 if [ "$1" = "" ]; then
    18     LAST=`cat ${TOPDIR}/LAST`
    19 else
    20     LAST=$1
    21     shift
    22 fi
    23 VER=`echo $LAST | cut -d- -f1`
    24 TAG=`echo $LAST | cut -d- -f2`
    25 echo "Working on ${VER}-$TAG"
    26 
    27 if [ _"$1" == _"" ]; then
    28     VM=`cat ${TOOLHOME}/DISTROS`
    29     VMS=""
    30     for $v in $VM; do
    31         VMS="$VMS `echo $VM | cut -d_ -f1`"
    32     done
    33 else
    34     export VMS="$1"
    35 fi
    36 
    37 
    38 cat > $TMP/mkmondo << EOF
    39 #!/bin/bash
    40 
    41 export LANG="C"
    42 export LANGUAGE="C"
    43 export LC_ALL="C"
    44 export TOOLHOME=$TOOLHOME
    45 
    46 \$TOOLHOME/build2pkg
    47 \$TOOLHOME/mkdeliv
    48 EOF
    49 chmod 755 $TMP/mkmondo
    5014
    5115ipvm=10.0.2.15
    5216sp=2222
    5317
    54 cd $TOOLHOME/..
    55 tar cvfz $TMP/mkmondo.tar.gz $TOOLHOME/tools $TMP/mkmondo $TOPDIR/${VER}-$TAG
    56 
    57 for m in $VMS; do
    58     vmp=0
    59     if [ ! -f /users/vmplayer/$m.qemu ]; then
    60             echo "VM unaccessible. Verify NFS mount"
    61             exit -1
    62     fi
    63     ps auxww | grep qemu | grep -v grep | grep -q /users/vmplayer/$m.qemu
    64     if [ $? -ne 0 ]; then
    65         # Virtual machine alreday started
    66         vmp=1
    67         qemu -m 256 $QEMUOPT -redir tcp:${sp}:${ipvm}:22 /users/vmplayer/$m.qemu &
    68         sleep 300
    69     fi
    70     scp -P $sp $TMP/mkmondo.tar.gz bruno@localhost:
    71     ssh -p $sp bruno@localhost "cd / ; tar xvfz $TMP/mkmondo.tar.gz ; $TMP/mkmondo" | tee $TMP/mkvm.log
    72     if [ $vmp -eq 1 ]; then
    73         ssh -p $sp root@localhost "halt -p"
    74         sleep 300
    75         proces=`ps auxww | grep qemu | grep -v grep | grep -q /users/vmplayer/$m.qemu | awk '{print $2}'`
    76         if [ "$proces" != "" ]; then
    77             kill $proces
    78         fi
    79     fi
    80 done
     18qemu -m 256 $QEMUOPT -redir tcp:${sp}:${ipvm}:22 /users/qemu/$m.qemu
Note: See TracChangeset for help on using the changeset viewer.