7
|
1 #!/bin/bash
|
|
2 #
|
|
3 # Quick'n'dirty qemu-system-arm wrapper
|
|
4 #
|
|
5 # This is a temporary wrapper script to enable
|
|
6 # qemu-system-arm 0.12.3 to be managed by libvirt 0.7.6
|
|
7 # (Fedora 13 Alpha). To use it:
|
|
8 # 1. mv /usr/bin/qemu-system-arm /usr/bin/qemu-system-arm.bin
|
|
9 # 2. save this script as /usr/bin/qemu-system-arm with
|
|
10 # appropriate permissions
|
|
11 #
|
|
12 # Chris Tyler 2010-03-11
|
|
13 #
|
|
14
|
|
15 LOGFILE=/dev/null
|
|
16 # LOGFILE=/tmp/aaa.log
|
|
17
|
|
18 ARGS="$(echo "$*"| \
|
|
19 sed -e "s/pci.[0-9]*/pci/g" \
|
|
20 -e "s/bus=scsi[^,]*//g" \
|
|
21 -e "s/-vga cirrus//g" \
|
|
22 -e "s/if=none,/if=scsi,/g" \
|
|
23 -e "s/-device scsi-disk[^ ]*//g" \
|
|
24 -e "s/-device rtl[^ ]*mac=\([a-fA-F0-9:]*\)[^ ]*/-net nic,macaddr=\1,vlan=0,name=nic.0/g" \
|
|
25 -e "s/-device [^ ]*//g" \
|
|
26 )"
|
|
27
|
|
28 echo "Date: $(date)" >>$LOGFILE
|
|
29 echo "Original args: $ARGS" >>$LOGFILE
|
|
30 echo "Edited args: $ARGS" >>$LOGFILE
|
|
31
|
|
32 /bin/qemu-system-arm.bin $ARGS
|
|
33
|
|
34 RESULT=$?
|
|
35 echo "Result code: $RESULT" >>$LOGFILE
|
|
36 # (echo "ID: ";id) >>/tmp/qemu.log
|
|
37
|
|
38 exit $?
|