diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2007-04-17 12:56:47 +0000 |
---|---|---|
committer | Matthias Schwarzott <zzam@gentoo.org> | 2007-04-17 12:56:47 +0000 |
commit | 96e5127d60af1db5b2d28ba91cc4a0d0b6a5e95b (patch) | |
tree | 2efa78e423b9a1193a11c94c0e4ed97703b601d9 /media-plugins | |
parent | Removed bash specific stuff. (diff) | |
download | gentoo-2-96e5127d60af1db5b2d28ba91cc4a0d0b6a5e95b.tar.gz gentoo-2-96e5127d60af1db5b2d28ba91cc4a0d0b6a5e95b.tar.bz2 gentoo-2-96e5127d60af1db5b2d28ba91cc4a0d0b6a5e95b.zip |
Removed bash specific stuff.
(Portage version: 2.1.2.4)
Diffstat (limited to 'media-plugins')
-rw-r--r-- | media-plugins/vdr-remote/ChangeLog | 5 | ||||
-rw-r--r-- | media-plugins/vdr-remote/files/rc-addon.sh | 58 |
2 files changed, 32 insertions, 31 deletions
diff --git a/media-plugins/vdr-remote/ChangeLog b/media-plugins/vdr-remote/ChangeLog index dc0b0bd87e50..3b2e8334968a 100644 --- a/media-plugins/vdr-remote/ChangeLog +++ b/media-plugins/vdr-remote/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for media-plugins/vdr-remote # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-remote/ChangeLog,v 1.13 2007/03/06 16:58:03 hd_brummy Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-remote/ChangeLog,v 1.14 2007/04/17 12:56:47 zzam Exp $ + + 17 Apr 2007; Matthias Schwarzott <zzam@gentoo.org> files/rc-addon.sh: + Removed bash specific stuff. *vdr-remote-0.3.9 (06 Mar 2007) diff --git a/media-plugins/vdr-remote/files/rc-addon.sh b/media-plugins/vdr-remote/files/rc-addon.sh index 3040192e17d2..5b5bdff49d18 100644 --- a/media-plugins/vdr-remote/files/rc-addon.sh +++ b/media-plugins/vdr-remote/files/rc-addon.sh @@ -6,32 +6,35 @@ check_device() { local handlers="${1}" local name="${2}" local eventdev="" - [[ "${handlers}" == "" ]] && return + [ "${handlers}" = "" ] && return + local handler for handler in ${handlers}; do - case ${handler} in + case "${handler}" in event*) eventdev=${handler} ;; esac done - if [[ "${eventdev}" == "" ]]; then - [[ "${evdev_warning_showed}" != "1" ]] \ - && echo "you need to load module evdev for autodetect input-devices to work" - evdev_warning_showed=1 - return - fi - if [[ (${name/dvb/} != ${name}) || (${name/DVB/} == ${name}) ]]; then + + 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 - - einfo_level1 "Autodetect Input Device ${eventdev} (Name: ${name})" - REMOTE_PLUGIN_INPUT_DEVICE="${REMOTE_PLUGIN_INPUT_DEVICE} /dev/input/${eventdev}" - return + + 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 + [ -e /proc/bus/input/devices ] || return exec 3</proc/bus/input/devices while read -u 3 line; do case ${line} in @@ -50,50 +53,45 @@ autodetect_input_devices() { } plugin_pre_vdr_start() { - if [[ ${REMOTE_PLUGIN_INPUT_DEVICE:-autodetect} == "autodetect" ]]; then + 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 + 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 + [ -e "${dev}" ] || continue chown vdr:vdr ${dev} add_plugin_param "--input=${dev}" done fi - if [[ -n ${REMOTE_PLUGIN_LIRC} ]]; then + if [ -n "${REMOTE_PLUGIN_LIRC}" ]; then for dev in ${REMOTE_PLUGIN_LIRC}; do - [[ -e ${dev} ]] || continue + [ -e "${dev}" ] || continue add_plugin_param "--lirc=${dev}" done fi - if [[ -n ${REMOTE_PLUGIN_TCP_PORTS} ]]; then + 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 + if [ -n "${REMOTE_PLUGIN_TTY_ONLY_INPUT}" ]; then for tty in ${REMOTE_PLUGIN_TTY_ONLY_INPUT}; do - [[ -e ${tty} ]] || continue + [ -e "${tty}" ] || continue chown vdr:vdr ${tty} add_plugin_param "--tty=${tty}" done fi - if [[ -n ${REMOTE_PLUGIN_TTY_WITH_OSD} ]]; then + if [ -n "${REMOTE_PLUGIN_TTY_WITH_OSD}" ]; then for tty in ${REMOTE_PLUGIN_TTY_WITH_OSD}; do - [[ -e ${tty} ]] || continue + [ -e "${tty}" ] || continue chown vdr:vdr ${tty} add_plugin_param "--TTY=${tty}" done fi } - -# for compatibility -if [[ ${SCRIPT_API:-1} -lt 2 ]]; then - plugin_pre_vdr_start -fi |