summaryrefslogtreecommitdiffstats
path: root/main/qemu/qemu-guest-agent.initd
blob: 83876308aea53c6691538a4a05f7a51ee1b1b9bb (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
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-guest-agent/files/qemu-ga.init,v 1.2 2012/10/30 21:12:20 cardoe Exp $

start() {
    GA_METHOD=${GA_METHOD:-virtio-serial}
    GA_PATH=${GA_PATH:-/dev/virtio-ports/org.qemu.guest_agent.0}

    ebegin "Starting QEMU Guest Agent"

    start-stop-daemon --start --pidfile /var/run/qemu-ga.pid \
        --exec /usr/bin/qemu-ga -- -m ${GA_METHOD} -p ${GA_PATH} \
        -l /var/log/qemu-ga.log -d

    eend $?
}

stop() {
    ebegin "Stopping QEMU Guest Agent"

    start-stop-daemon --stop --pidfile /var/run/qemu-ga.pid

    eend $?
}