Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- #Copyright 2012 CurlyMo <development@xbian.org>
- #
- #Resize SD function is based on the corresponding function in raspi-config
- #The overclocking function is copied from raspi-config
- #raspi-config is created by Alex Bradbury <asb@asbradbury.org>
- #
- #This file is part of XBian - XBMC on the Raspberry Pi.
- #
- #XBian is free software: you can redistribute it and/or modify it under the
- #terms of the GNU General Public License as published by the Free Software
- #Foundation, either version 3 of the License, or (at your option) any later
- #version.
- #
- #XBian is distributed in the hope that it will be useful, but WITHOUT ANY
- #WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- #FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- #details.
- #
- #You should have received a copy of the GNU General Public License along
- #with XBian. If not, see <http://www.gnu.org/licenses/>
- #
- #|-----------------------------------------------------|
- #| Use the /etc/lirc/hardware/custom.conf file if you |
- #| want to define a hardware configuration still |
- #| unsupported by XBian. If you have created a working |
- #| config for an unsupported remote, then please share |
- #| it with us so we can include it in future builds. |
- #|-----------------------------------------------------|
- if [ -f "/usr/local/share/xbmc/system/keymaps/remote.xml.xbian" ]; then
- if [ -L "/usr/local/share/xbmc/system/keymaps/remote.xml" ]; then
- rm /usr/local/share/xbmc/system/keymaps/remote.xml
- fi
- cp /usr/local/share/xbmc/system/keymaps/remote.xml.xbian /usr/local/share/xbmc/system/keymaps/remote.xml
- fi
- . /etc/lirc/hardware/custom.conf
- if [ -z $LIRCD_ARGS ] && [ $START_LIRCMD ] && [ $START_IREXEC ] && [ -z $LOAD_MODULES ] && [ -z $DRIVER ] && [ -z $DEVICE ] && [ -z $MODULES ] && [ -z $LIRCD_CONF ] && [ -z $LIRCMD_CONF ]; then
- if [ $(dmesg | grep lirc_rpi | wc -l) -gt 0 ]; then
- . /etc/lirc/hardware/lirc_rpi.conf
- elif [ $(dmesg | grep mceusb | wc -l) -gt 0 ]; then
- if [ $(cat /proc/bus/input/devices | grep 'Media Center Ed.' | wc -l) -gt 0 ]; then
- if [ $(cat /proc/bus/input/devices | grep -m 1 -A 4 'Media Center Ed.' | grep -o event[0-9] | sed -e 's/event//g') -eq 0 ]; then
- . /etc/lirc/hardware/mceusb_event0.conf
- elif [ $(cat /proc/bus/input/devices | grep -m 1 -A 4 'Media Center Ed.' | grep -o event[0-9] | sed -e 's/event//g') -eq 1 ]; then
- . /etc/lirc/hardware/mceusb_event1.conf
- elif [ $(cat /proc/bus/input/devices | grep -m 1 -A 4 'Media Center Ed.' | grep -o event[0-9] | sed -e 's/event//g') -eq 2 ]; then
- . /etc/lirc/hardware/mceusb_event2.conf
- else
- . /etc/lirc/hardware/mceusb.conf
- fi
- else
- . /etc/lirc/hardware/mceusb.conf
- fi
- elif [ $(lsusb | grep -i xbox | wc -l) -gt 0 ]; then
- . /etc/lirc/hardware/xbox.conf
- elif [ $(dmesg | grep 'Philips RF Dongle' | wc -l) -gt 0 ]; then
- . /etc/lirc/hardware/srm7500libusb.conf
- elif [ $(dmesg | grep tigerfly | wc -l) -gt 0 ]; then
- if [ ! -f "/usr/local/share/xbmc/system/keymaps/remote.xml.xbian" ]; then
- mv /usr/local/share/xbmc/system/keymaps/remote.xml /usr/local/share/xbmc/system/keymaps/remote.xml.xbian
- fi
- ln -s /etc/lirc/remotes/tigerfly.xml /usr/local/share/xbmc/system/keymaps/remote.xml
- . /etc/lirc/hardware/default.conf
- else
- . /etc/lirc/hardware/default.conf
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement