aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/disk-image-builder/nested/image-patches/04-qemu-ga
diff options
context:
space:
mode:
Diffstat (limited to 'resources/tools/disk-image-builder/nested/image-patches/04-qemu-ga')
-rwxr-xr-xresources/tools/disk-image-builder/nested/image-patches/04-qemu-ga33
1 files changed, 33 insertions, 0 deletions
diff --git a/resources/tools/disk-image-builder/nested/image-patches/04-qemu-ga b/resources/tools/disk-image-builder/nested/image-patches/04-qemu-ga
new file mode 100755
index 0000000000..2897260d10
--- /dev/null
+++ b/resources/tools/disk-image-builder/nested/image-patches/04-qemu-ga
@@ -0,0 +1,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