Advertisement
Guest User

Untitled

a guest
Feb 16th, 2013
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. #
  2. #Copyright 2012 CurlyMo <development@xbian.org>
  3. #
  4. #Resize SD function is based on the corresponding function in raspi-config
  5. #The overclocking function is copied from raspi-config
  6. #raspi-config is created by Alex Bradbury <asb@asbradbury.org>
  7. #
  8. #This file is part of XBian - XBMC on the Raspberry Pi.
  9. #
  10. #XBian is free software: you can redistribute it and/or modify it under the
  11. #terms of the GNU General Public License as published by the Free Software
  12. #Foundation, either version 3 of the License, or (at your option) any later
  13. #version.
  14. #
  15. #XBian is distributed in the hope that it will be useful, but WITHOUT ANY
  16. #WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  17. #FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  18. #details.
  19. #
  20. #You should have received a copy of the GNU General Public License along
  21. #with XBian. If not, see <http://www.gnu.org/licenses/>
  22. #
  23. #|-----------------------------------------------------|
  24. #| Use the /etc/lirc/hardware/custom.conf file if you |
  25. #| want to define a hardware configuration still |
  26. #| unsupported by XBian. If you have created a working |
  27. #| config for an unsupported remote, then please share |
  28. #| it with us so we can include it in future builds. |
  29. #|-----------------------------------------------------|
  30.  
  31. if [ -f "/usr/local/share/xbmc/system/keymaps/remote.xml.xbian" ]; then
  32. if [ -L "/usr/local/share/xbmc/system/keymaps/remote.xml" ]; then
  33. rm /usr/local/share/xbmc/system/keymaps/remote.xml
  34. fi
  35. cp /usr/local/share/xbmc/system/keymaps/remote.xml.xbian /usr/local/share/xbmc/system/keymaps/remote.xml
  36. fi
  37.  
  38. . /etc/lirc/hardware/custom.conf
  39. if [ -z $LIRCD_ARGS ] && [ $START_LIRCMD ] && [ $START_IREXEC ] && [ -z $LOAD_MODULES ] && [ -z $DRIVER ] && [ -z $DEVICE ] && [ -z $MODULES ] && [ -z $LIRCD_CONF ] && [ -z $LIRCMD_CONF ]; then
  40. if [ $(dmesg | grep lirc_rpi | wc -l) -gt 0 ]; then
  41. . /etc/lirc/hardware/lirc_rpi.conf
  42. elif [ $(dmesg | grep mceusb | wc -l) -gt 0 ]; then
  43. if [ $(cat /proc/bus/input/devices | grep 'Media Center Ed.' | wc -l) -gt 0 ]; then
  44. 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
  45. . /etc/lirc/hardware/mceusb_event0.conf
  46. 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
  47. . /etc/lirc/hardware/mceusb_event1.conf
  48. 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
  49. . /etc/lirc/hardware/mceusb_event2.conf
  50. else
  51. . /etc/lirc/hardware/mceusb.conf
  52. fi
  53. else
  54. . /etc/lirc/hardware/mceusb.conf
  55. fi
  56. elif [ $(lsusb | grep -i xbox | wc -l) -gt 0 ]; then
  57. . /etc/lirc/hardware/xbox.conf
  58. elif [ $(dmesg | grep 'Philips RF Dongle' | wc -l) -gt 0 ]; then
  59. . /etc/lirc/hardware/srm7500libusb.conf
  60. elif [ $(dmesg | grep tigerfly | wc -l) -gt 0 ]; then
  61. if [ ! -f "/usr/local/share/xbmc/system/keymaps/remote.xml.xbian" ]; then
  62. mv /usr/local/share/xbmc/system/keymaps/remote.xml /usr/local/share/xbmc/system/keymaps/remote.xml.xbian
  63. fi
  64. ln -s /etc/lirc/remotes/tigerfly.xml /usr/local/share/xbmc/system/keymaps/remote.xml
  65. . /etc/lirc/hardware/default.conf
  66. else
  67. . /etc/lirc/hardware/default.conf
  68. fi
  69. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement