From: | "Doug Goldstein (cardoe)" <cardoe@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in app-emulation/spice-vdagent/files: spice-vdagent.initd-2 spice-vdagent.confd-2 |
Date: | Sun, 08 Jul 2012 03:20:47 |
Message-Id: | 20120708032032.1C6D420065@flycatcher.gentoo.org |
1 | cardoe 12/07/08 03:20:32 |
2 | |
3 | Added: spice-vdagent.initd-2 spice-vdagent.confd-2 |
4 | Log: |
5 | Version bump. Check for CONFIG_VIRTIO_CONSOLE since its necessary. Check if we should use /dev/uinput or /dev/input/uinput on startup. bug #378833 |
6 | |
7 | (Portage version: 2.1.10.65/cvs/Linux x86_64) |
8 | |
9 | Revision Changes Path |
10 | 1.1 app-emulation/spice-vdagent/files/spice-vdagent.initd-2 |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/spice-vdagent/files/spice-vdagent.initd-2?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/spice-vdagent/files/spice-vdagent.initd-2?rev=1.1&content-type=text/plain |
14 | |
15 | Index: spice-vdagent.initd-2 |
16 | =================================================================== |
17 | #!/sbin/runscript |
18 | # Copyright 1999-2012 Gentoo Foundation |
19 | # Distributed under the terms of the GNU General Public License v2 |
20 | # $Header: /var/cvsroot/gentoo-x86/app-emulation/spice-vdagent/files/spice-vdagent.initd-2,v 1.1 2012/07/08 03:20:31 cardoe Exp $ |
21 | |
22 | depend() { |
23 | after dbus |
24 | } |
25 | |
26 | PIDFILE="/var/run/spice-vdagentd/spice-vdagentd.pid" |
27 | |
28 | start() { |
29 | PORT="${PORT:-/dev/virtio-ports/com.redhat.spice.0}" |
30 | DEVICE="${DEVICE:-/dev/uinput}" |
31 | |
32 | ebegin "Checking for required modules and devices" |
33 | |
34 | if [[ ! -d /sys/module/uinput ]]; then |
35 | modprobe -q uinput |
36 | fi |
37 | |
38 | if [[ ! -d /sys/module/uinput ]]; then |
39 | eerror "Module 'uinput' not loaded or not enabled in the kernel" |
40 | eend 1 |
41 | return 1 |
42 | fi |
43 | |
44 | if [[ ! -c "${PORT}" ]] ; then |
45 | eerror "Required virtio port does not exist. Make sure you" |
46 | eerror "started the virtual machine with appropriate parameters." |
47 | eend 1 |
48 | return 1 |
49 | fi |
50 | eend 0 |
51 | |
52 | if [[ ! -c ${DEVICE} && -c /dev/input/uinput ]]; then |
53 | DEVICE=/dev/input/uinput |
54 | fi |
55 | |
56 | # recreate the directory since /var/run may reside on a ramdisk |
57 | mkdir -p /var/run/spice-vdagentd |
58 | |
59 | # cleanup stalled socket |
60 | rm -f /var/run/spice-vdagentd/spice-vdagent-sock |
61 | |
62 | ebegin "Starting spice VD agent daemon" |
63 | start-stop-daemon \ |
64 | --start \ |
65 | --pidfile "${PIDFILE}" \ |
66 | --exec /usr/sbin/spice-vdagentd \ |
67 | -- -u "${DEVICE}" ${SPICE_VDAGENT_ARGS} |
68 | eend $? |
69 | } |
70 | |
71 | stop() { |
72 | ebegin "Stopping spice VD agent daemon" |
73 | start-stop-daemon \ |
74 | --stop \ |
75 | --pidfile "${PIDFILE}" |
76 | eend $? |
77 | } |
78 | |
79 | |
80 | |
81 | 1.1 app-emulation/spice-vdagent/files/spice-vdagent.confd-2 |
82 | |
83 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/spice-vdagent/files/spice-vdagent.confd-2?rev=1.1&view=markup |
84 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/spice-vdagent/files/spice-vdagent.confd-2?rev=1.1&content-type=text/plain |
85 | |
86 | Index: spice-vdagent.confd-2 |
87 | =================================================================== |
88 | # The virtual communication port provided by the hypervisor/vm |
89 | # Default: /dev/virtio-ports/com.redhat.spice.0 |
90 | #PORT="/dev/virtio-ports/com.redhat.spice.0" |
91 | |
92 | # Userspace Input Device |
93 | # Default: /dev/uinput or /dev/input/uinput |
94 | #DEVICE="" |
95 | |
96 | # Extra arguments for spice-vdagentd |
97 | # Default: none |
98 | #SPICE_VDAGENT_ARGS="" |