diff options
| author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2008-12-11 01:37:12 (GMT) |
|---|---|---|
| committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2008-12-11 01:37:12 (GMT) |
| commit | 54e39512d743caf5afe2f587536135c450ea4fcf (patch) | |
| tree | 22e7ba4ba242782064d36d7a3828b01800436d38 /abs/core-testing/LinHES-config/install_functions.sh | |
| parent | 8417e5e3b118ed9e12563a3d4fceeb38b9e73d4f (diff) | |
| parent | 42129857874c470c65d3b1dcb4bf42945a98dcfa (diff) | |
| download | linhes_pkgbuild-54e39512d743caf5afe2f587536135c450ea4fcf.zip linhes_pkgbuild-54e39512d743caf5afe2f587536135c450ea4fcf.tar.gz linhes_pkgbuild-54e39512d743caf5afe2f587536135c450ea4fcf.tar.bz2 | |
Merge branch 'HEAD' of ssh://cesman@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Conflicts:
abs/core-testing/LinHES-config/LinHES-release
Diffstat (limited to 'abs/core-testing/LinHES-config/install_functions.sh')
| -rwxr-xr-x | abs/core-testing/LinHES-config/install_functions.sh | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/abs/core-testing/LinHES-config/install_functions.sh b/abs/core-testing/LinHES-config/install_functions.sh index 3e7f8f8..d976dbb 100755 --- a/abs/core-testing/LinHES-config/install_functions.sh +++ b/abs/core-testing/LinHES-config/install_functions.sh @@ -35,7 +35,7 @@ update_db_settings Theme "$pick" function setupremote { - [ -e $BASE/etc/lircd.conf ] && mv -f $BASE/etc/lircd.conf $BASE/etc/lircd.conf.`date +%Y-%m-%d-%H-%M` + [ -e $BASE/etc/lircd.conf ] && mv -f $BASE/etc/lircd.conf $BASE/etc/lircd.conf.`date +%Y-%m-%d-%H-%M` if [ -d $TEMPLATES/remotes/$Remotetype ] then cd $TEMPLATES/remotes/$Remotetype @@ -50,16 +50,40 @@ function setupremote { echo "Starting with support for $Remotetype" if [ x$Remotetype = "xdvico" ] then - /usr/sbin/lircd -d /dev/usb/hiddev0 + /usr/sbin/lircd -d /dev/usb/hiddev0 else /usr/sbin/lircd -d /dev/lirc0 fi [ -e /root/.mythtv ] || mkdir /root/.mythtv 2>/dev/null - ln -s /etc/lircrc /root/.mythtv/lircrc 2>/dev/null + ln -s /etc/lircrc /root/.mythtv/lircrc 2>/dev/null + else + echo "Couldn't open directory $TEMPLATES/remotes/$Remotetype" fi } +function scan_for_hpg_receiver() { +echo "Scanning for Hauppauge receiver" +for hpgid in `lspci -nm -d4444: |cut -d" " -f6- |tr -d '"'|tr " " :` +do + line=`grep $hpgid $TEMPLATES/remotes/i2c.id` + if [ $? = 0 ] + then + modprobe lirc_i2c + FoundReceiverType=`echo "$line"|cut -d"|" -f2` + Remotetype=`echo "$line"|cut -d"|" -f4` + statusline=`echo "$line"|cut -d"|" -f2,4` + echo "Found $statusline , $Remotetype" + update_db_settings HostReceiverType $FoundReceiverType + setupremote + break + fi + +done +} + + function scan_for_usb_remote () { +found_remote=1 echo "Scanning for usb receiver/remote" while read line do @@ -68,11 +92,16 @@ do if [ $? = 0 ] then Remotetype=`echo "$line"|cut -d"|" -f2` - echo "found $Remotetype" + echo "Found $Remotetype" setupremote + found_remote=0 break fi done <$BASE/$TEMPLATES/remotes/receiver_usb.id +if [ $found_remote = 1 ] +then + scan_for_hpg_receiver +fi } function rest_of_network () { |
