diff options
author | Carsten Koester <ckoester@cisco.com> | 2016-05-25 05:58:29 -0400 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2016-06-02 00:18:28 +0000 |
commit | 9d378548cc86028c55baf17260d32d0055603b78 (patch) | |
tree | 1cc67da7195459abcaca5f12f0f4b74bc399b60e /resources/tools/disk-image-builder/nested/patches/04-qemu-ga | |
parent | 036f36181c177e4c77f22cdbdcb87fb2f94df3bf (diff) |
CSIT-111: Add Packer based framework to auto-generate disk images
Change-Id: Ia18ea34a6288aec0f12f176f4cc264d0f215d1fd
Signed-off-by: Carsten Koester <ckoester@cisco.com>
Diffstat (limited to 'resources/tools/disk-image-builder/nested/patches/04-qemu-ga')
-rwxr-xr-x | resources/tools/disk-image-builder/nested/patches/04-qemu-ga | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/resources/tools/disk-image-builder/nested/patches/04-qemu-ga b/resources/tools/disk-image-builder/nested/patches/04-qemu-ga new file mode 100755 index 0000000000..2897260d10 --- /dev/null +++ b/resources/tools/disk-image-builder/nested/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 |