diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-plugins/vdr-remote/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-plugins/vdr-remote/files')
-rw-r--r-- | media-plugins/vdr-remote/files/confd | 43 | ||||
-rw-r--r-- | media-plugins/vdr-remote/files/rc-addon.sh | 97 |
2 files changed, 140 insertions, 0 deletions
diff --git a/media-plugins/vdr-remote/files/confd b/media-plugins/vdr-remote/files/confd new file mode 100644 index 000000000000..d34513c6d230 --- /dev/null +++ b/media-plugins/vdr-remote/files/confd @@ -0,0 +1,43 @@ +# /etc/conf.d/vdr.remote: + +# Config-file for vdr plugin remote + +# +# Read keypresses from linux-kernel input-devices +# for example IR-Input on DVB-cards +# allowed values: no, autodetect or list of devices /dev/input/eventX (X=0,1,...) +# default: autodetect +# +#REMOTE_PLUGIN_INPUT_DEVICE="no" +# + +# +# Connect to lirc-daemon on this socket +# allowed values: list of sockets, example: /dev/lircd +# default: do not use any lirc-daemon from inside this plugin +# +#REMOTE_PLUGIN_LIRC="" + +# +# Listen on these tcp-ports for connections which get OSD and +# can send keypresses to vdr +# allowed values: List of portnumbers (>1024) +# default: do not open any tcp-port +# +#REMOTE_PLUGIN_TCP_PORTS="" + +# +# Listen on these tty-device for keypresses, do not show osd there +# allowed values: List of tty-device names (/dev/ttyX) +# default: do not open any tty-devices +# +#REMOTE_PLUGIN_TTY_ONLY_INPUT="" + +# +# Listen on these tty-device for keypresses and show the +# osd there +# allowed values: List of tty-device names (/dev/ttyX) +# default: do not open any tty-devices +# +#REMOTE_PLUGIN_TTY_WITH_OSD="" + diff --git a/media-plugins/vdr-remote/files/rc-addon.sh b/media-plugins/vdr-remote/files/rc-addon.sh new file mode 100644 index 000000000000..5b5bdff49d18 --- /dev/null +++ b/media-plugins/vdr-remote/files/rc-addon.sh @@ -0,0 +1,97 @@ +# +# rc-addon-script for plugin remote +# + +check_device() { + local handlers="${1}" + local name="${2}" + local eventdev="" + [ "${handlers}" = "" ] && return + + local handler + for handler in ${handlers}; do + case "${handler}" in + event*) + eventdev=${handler} + ;; + esac + done + + if [ "${eventdev}" = "" ]; then + if [ "${evdev_warning_showed}" != "1" ]; then + echo "you need to load module evdev for autodetect input-devices to work" + evdev_warning_showed=1 + fi + return + fi + + case "${name}" in + *dvb*|*DVB*) + einfo_level1 "Autodetect Input Device ${eventdev} (Name: ${name})" + REMOTE_PLUGIN_INPUT_DEVICE="${REMOTE_PLUGIN_INPUT_DEVICE} /dev/input/${eventdev}" + ;; + esac +} + +autodetect_input_devices() { + [ -e /proc/bus/input/devices ] || return + exec 3</proc/bus/input/devices + while read -u 3 line; do + case ${line} in + I:*) check_device "${device}" "${name}" + device="" + ;; + H:*) device=${line#H: Handlers=} + ;; + N:*) name=${line#N: Name=\"} + name=${name%\"} + ;; + esac + done + check_device "${device}" "${name}" + exec 3<&- +} + +plugin_pre_vdr_start() { + if [ "${REMOTE_PLUGIN_INPUT_DEVICE:-autodetect}" = "autodetect" ]; then + REMOTE_PLUGIN_INPUT_DEVICE="" + autodetect_input_devices + fi + if [ -n "${REMOTE_PLUGIN_INPUT_DEVICE}" ] && [ "${REMOTE_PLUGIN_INPUT_DEVICE}" != "no" ]; then + [ -e /proc/av7110_ir ] && chown vdr:vdr /proc/av7110_ir + for dev in ${REMOTE_PLUGIN_INPUT_DEVICE}; do + [ -e "${dev}" ] || continue + chown vdr:vdr ${dev} + add_plugin_param "--input=${dev}" + done + fi + + if [ -n "${REMOTE_PLUGIN_LIRC}" ]; then + for dev in ${REMOTE_PLUGIN_LIRC}; do + [ -e "${dev}" ] || continue + add_plugin_param "--lirc=${dev}" + done + fi + + if [ -n "${REMOTE_PLUGIN_TCP_PORTS}" ]; then + for tcpport in ${REMOTE_PLUGIN_TCP_PORTS}; do + add_plugin_param "--port=tcp:${tcpport}" + done + fi + + if [ -n "${REMOTE_PLUGIN_TTY_ONLY_INPUT}" ]; then + for tty in ${REMOTE_PLUGIN_TTY_ONLY_INPUT}; do + [ -e "${tty}" ] || continue + chown vdr:vdr ${tty} + add_plugin_param "--tty=${tty}" + done + fi + + if [ -n "${REMOTE_PLUGIN_TTY_WITH_OSD}" ]; then + for tty in ${REMOTE_PLUGIN_TTY_WITH_OSD}; do + [ -e "${tty}" ] || continue + chown vdr:vdr ${tty} + add_plugin_param "--TTY=${tty}" + done + fi +} |