source:
MondoRescue/branches/stable/tools/mkqemu@
1517
Last change on this file since 1517 was 1474, checked in by , 17 years ago | |
---|---|
|
|
File size: 703 bytes |
Rev | Line | |
---|---|---|
[440] | 1 | #!/bin/bash |
2 | # | |
3 | # $Id$ | |
4 | # | |
[556] | 5 | # Call virtual machine with qemu |
[440] | 6 | # |
[1334] | 7 | ( |
8 | dname=`dirname $0` | |
9 | prem=`echo $dname |cut -c1` | |
10 | if [ _${prem} = _"/" ]; then | |
11 | export TOOLHOME=$dname | |
12 | else | |
13 | export TOOLHOME=${PWD}/$dname | |
14 | fi | |
[440] | 15 | |
[1334] | 16 | . $TOOLHOME/common-env |
17 | . $TOOLHOME/distro-env | |
18 | ||
[1042] | 19 | if [ _"$1" = _"" ]; then |
[556] | 20 | echo "Syntax: qemu vm" |
[440] | 21 | exit -1 |
22 | else | |
[556] | 23 | m=$1 |
[440] | 24 | fi |
[1467] | 25 | . $TOOLHOME/qemu-env |
[440] | 26 | |
[1340] | 27 | if [ _"$QEMUAPP" != _"" ]; then |
28 | $qemucmd -m 256 $QEMUOPT -append "$QEMUAPP" -redir tcp:${sp}:${ipvm}:22 /users/qemu/$m.qemu | |
[1474] | 29 | exit 0 |
30 | fi | |
31 | ||
32 | echo $m | grep -q '_64$' | |
33 | if [ $? -ne 0 ]; then | |
34 | qemucmd=$qemucmd32 | |
[1340] | 35 | else |
[1474] | 36 | qemucmd="$qemucmd64 -no-kqemu" |
[1340] | 37 | fi |
[1474] | 38 | $qemucmd -m 256 $QEMUOPT -redir tcp:${sp}:${ipvm}:22 /users/qemu/$m.qemu |
[1334] | 39 | ) 2>&1 | tee /tmp/mkqemu.log |
Note:
See TracBrowser
for help on using the repository browser.