summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/install_functions.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-08-26 21:05:10 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-08-26 21:05:10 (GMT)
commitc95f3e81458c4e0978ef07cea521fec7130aba8f (patch)
treef030da178fd537fbbaf52784cfabe853075774ce /abs/core/LinHES-config/install_functions.sh
parent511f4c8412ccd6d342c3653ca009b9890efaf20e (diff)
downloadlinhes_pkgbuild-c95f3e81458c4e0978ef07cea521fec7130aba8f.zip
linhes_pkgbuild-c95f3e81458c4e0978ef07cea521fec7130aba8f.tar.gz
linhes_pkgbuild-c95f3e81458c4e0978ef07cea521fec7130aba8f.tar.bz2
LinHES-config: install_functions.sh renamed common->favorites for the default
Diffstat (limited to 'abs/core/LinHES-config/install_functions.sh')
-rwxr-xr-xabs/core/LinHES-config/install_functions.sh28
1 files changed, 25 insertions, 3 deletions
diff --git a/abs/core/LinHES-config/install_functions.sh b/abs/core/LinHES-config/install_functions.sh
index 08206fc..69d978d 100755
--- a/abs/core/LinHES-config/install_functions.sh
+++ b/abs/core/LinHES-config/install_functions.sh
@@ -61,9 +61,10 @@ function bootsplash_setup (){
function setupremote {
[ -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 ]
+ remotepath="$TEMPLATES/remotes/$remotebucket/$Remotetype"
+ if [ -d ${remotepath} ]
then
- cd $TEMPLATES/remotes/$Remotetype
+ cd ${remotepath}
for i in lircd*
do
cat $i >> $BASE/etc/lircd.conf
@@ -71,6 +72,8 @@ function setupremote {
cp -f lircrc* $BASE/etc/lircrc 2> /dev/null
[ -e /etc/lircrc ] && chmod 755 /etc/lircrc
update_db_settings HostRemoteType "$Remotetype"
+ update_db_settings HostRemotebucket "$remotebucket"
+ update_db_settings HostRemoteType_${remotebucket} "$Remotetype"
#special case for special remote
printhl "Starting with support for $Remotetype"
if [ "$Remotetype" == "dvico" ]
@@ -85,7 +88,7 @@ function setupremote {
[ -e /root/.mythtv ] || mkdir /root/.mythtv 2>/dev/null
ln -s /etc/lircrc /root/.mythtv/lircrc 2>/dev/null
else
- echo "Couldn't open directory $TEMPLATES/remotes/$Remotetype"
+ echo "Couldn't open directory ${remotepath}"
fi
}
@@ -100,6 +103,8 @@ do
FoundReceiverType=`echo "$line"|cut -d"|" -f2`
Remotetype=`echo "$line"|cut -d"|" -f4`
statusline=`echo "$line"|cut -d"|" -f2,4`
+ remotebucket=`echo "$line"|cut -d"|" -f5`
+ #echo $remotebucket
#echo "Found $statusline , $Remotetype"
echo "Found Hauppauge"
echo "-------------------"
@@ -139,6 +144,7 @@ do
if [ $? -eq 0 ]
then
Remotetype=`echo "$line"|cut -d"|" -f2`
+ remotebucket=`echo "$line"|cut -d"|" -f4`
printhl "Found $Remotetype"
setupremote
found_remote=0
@@ -159,6 +165,8 @@ if [ $found_remote -eq 1 ]
then
#No remote found_remote
update_db_settings HostRemoteType "no_remote"
+ update_db_settings HostRemotebucket "favorites"
+ update_db_settings HostRemoteType_favorites "no_remote"
fi
}
@@ -348,6 +356,8 @@ function init_remote {
then
TEMPVAR=${CMDLINE#*remoteport=}
REMOTEPORT=${TEMPVAR%% *}
+ #port was given assume we are using a serial receiver
+ ReceiverType="Serial"
if [ x"$ReceiverType" = "xSerial" ]
then
if [ -e /dev/$REMOTEPORT ]
@@ -362,11 +372,23 @@ function init_remote {
fi
in_kernel_support "disable"
+ echo $CMDLINE | grep -q remotebucket
+ if [ $? -eq 0 ]
+ then
+ TEMPVAR=${CMDLINE#*remotebucket=}
+ remotebucket=${TEMPVAR%% *}
+ else
+ remotebucket="favorites"
+ fi
+
+
+
echo $CMDLINE | grep -q remote
if [ $? -eq 0 ]
then
TEMPVAR=${CMDLINE#*remote=}
Remotetype=${TEMPVAR%% *}
+
setupremote
else
scan_for_usb_remote