aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/spice-vdagent/spice-vdagentd.initd
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2016-08-25 15:26:24 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2016-08-25 15:26:24 +0200
commitb6af1e02efe594039707cd882517663d5370f375 (patch)
treeff9c2d55873e051e82972ba64c017352d3a75d34 /unmaintained/spice-vdagent/spice-vdagentd.initd
parenta71346b7acebc600960a98c84fb32cfd72fe864b (diff)
downloadaports-b6af1e02efe594039707cd882517663d5370f375.tar.bz2
aports-b6af1e02efe594039707cd882517663d5370f375.tar.xz
testing/[multiple]: move unmaintained packages
This moves all packages from testing to unmaintained which have not been updated for atleast 6 months. If you are affected by this commit please follow this proceddure: * make sure your packages build on all architectures * move your pacakge(s) back to testing * if you want to keep this package and can maintain it (or find somebody to maintain it for you) for a minimum of 6 months ask it to be moved to community
Diffstat (limited to 'unmaintained/spice-vdagent/spice-vdagentd.initd')
-rw-r--r--unmaintained/spice-vdagent/spice-vdagentd.initd97
1 files changed, 97 insertions, 0 deletions
diff --git a/unmaintained/spice-vdagent/spice-vdagentd.initd b/unmaintained/spice-vdagent/spice-vdagentd.initd
new file mode 100644
index 0000000000..5c04d0242c
--- /dev/null
+++ b/unmaintained/spice-vdagent/spice-vdagentd.initd
@@ -0,0 +1,97 @@
+#!/sbin/openrc-run
+
+# This file is part of spice-vdagent
+# by Stuart Cardall <developer@it-offshore.co.uk>
+
+sockfile="/var/run/spice-vdagentd/spice-vdagent-sock"
+pidfile="/var/run/spice-vdagentd/spice-vdagentd.pid"
+command="/usr/sbin/spice-vdagentd"
+command_args="-X"
+msgfile=/tmp/spice-vdagent.msg
+extra_commands="info"
+
+MODULES="uinput"
+
+depend() {
+ need net
+ need logger
+}
+
+start_pre() {
+ # make sure dir for pidfile exists. /var/run is tmpfs...
+ checkpath --directory ${pidfile%/*}
+ # load userspace input driver for copy & paste support
+ ebegin "Loading uinput kernel module for ${SVCNAME}"
+ for mod in $MODULES; do
+ modprobe -q $mod
+ done
+ eend $?
+ rm -f $sockfile
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start $command --pidfile $pidfile -- $command_args
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile $pidfile
+ eend $? "Failed to stop ${SVCNAME}"
+ ebegin "Unloading uinput kernel module for ${SVCNAME}"
+ for mod in $MODULES; do
+ rmmod $mod
+ done
+ eend $?
+ rm -f $sockfile
+}
+
+info() {
+ cat > $msgfile <<EOF
+By default the daemon is run with $command_args="-X" to disable consolekit
+support & allow a single agent session only. Run without '-X' & install lxdm
+or slim for muliple sessions.
+
+------------------------------------------------------------------------------
+Settings for libvirt:
+------------------------------------------------------------------------------
+<channel type='spicevmc'>
+ <target type='virtio' name='com.redhat.spice.0'/>
+ <address type='virtio-serial' controller='0' bus='0' port='1'/>
+</channel>
+ <input type='tablet' bus='usb'/>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+<graphics type='spice' autoport='yes' listen='127.0.0.1'>
+ <listen type='address' address='127.0.0.1'/>
+ <channel name='main' mode='insecure'/>
+ <channel name='record' mode='insecure'/>
+ <image compression='auto_glz'/>
+ <jpeg compression='auto'/>
+ <zlib compression='auto'/>
+ <playback compression='on'/>
+ <streaming mode='filter'/>
+ <mouse mode='client'/>
+ <clipboard copypaste='yes'/>
+ <filetransfer enable='yes'/>
+</graphics>
+<video>
+ <model type='qxl' ram='65536' vram='9216' heads='1'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+</video>
+
+------------------------------------------------------------------------------
+Settings for /etc/X11/xorg.conf: <install xf86-video-qxl>
+------------------------------------------------------------------------------
+Section "Device"
+ Identifier "Videocard0"
+ Driver "qxl"
+ Option "EnableSurfaces" "0"
+EndSection
+EOF
+
+cat $msgfile
+rm -f $msgfile
+}
+