aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/disk-image-builder/nested/patches/04-qemu-ga
blob: 2897260d10acb993d95c7d6d7352c95a6413cd69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh

cat - > etc/init.d/S45qemu-ga <<"_EOF"
#!/bin/sh
#
# Start QEMU guest agent
#
QEMU_GA_MODE="isa-serial"
QEMU_GA_DEV="/dev/ttyS1"

case "$1" in
  start)
 	echo "Starting qemu guest agent..."
	/usr/bin/qemu-ga -m $QEMU_GA_MODE -p $QEMU_GA_DEV -d
	;;
  stop)
	echo "Stopping quemu guest agent..."
	killall qemu-ga
	;;
  restart|reload)
	"$0" stop
	"$0" start
	;;
  *)
	echo "Usage: $0 {start|stop|restart}"
	exit 1
esac

exit $?
_EOF

chown root.root etc/init.d/S45qemu-ga
chmod 755 etc/init.d/S45qemu-ga