summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-config/ir_config.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing/LinHES-config/ir_config.sh')
-rw-r--r--abs/core-testing/LinHES-config/ir_config.sh42
1 files changed, 14 insertions, 28 deletions
diff --git a/abs/core-testing/LinHES-config/ir_config.sh b/abs/core-testing/LinHES-config/ir_config.sh
index 69d8406..28134e2 100644
--- a/abs/core-testing/LinHES-config/ir_config.sh
+++ b/abs/core-testing/LinHES-config/ir_config.sh
@@ -2,8 +2,7 @@ function include_lirc () {
config_file=$1
include_file=$2
grep -q ${include_file} ${config_file}
- if [ $? = 0 ]
- then
+ if [ "$?" == "0" ]; then
echo ${include_file} already present
else
echo "include \"${include_file}\"" >> $config_file
@@ -39,8 +38,7 @@ function setup_ir_remote {
#make backup copy
mv ${BASE}/etc/lircd.conf ${BASE}/etc/lircd.conf.`date +%Y-%m-%d-%H-%M`
mv ${BASE}/etc/lircrc ${BASE}/etc/lircrc.`date +%Y-%m-%d-%H-%M`
- if [ $HostBlasterType = pvr150 ]
- then
+ if [ "$HostBlasterType" == "pvr150" ]; then
Remotetype=hauppauge-blaster
fi
@@ -58,18 +56,15 @@ function setup_ir_remote {
chmod 755 /etc/lircrc
daemon_add="lircd $daemon_add"
#standard location for mythtv lircrc
- if [ ! -e /home/mythtv/.mythtv/lircrc ]
- then
- if [ ! -d /home/mythtv/.mythtv ]
- then
+ if [ ! -e /home/mythtv/.mythtv/lircrc ]; then
+ if [ ! -d /home/mythtv/.mythtv ]; then
mkdir /home/mythtv/.mythtv
chown mythtv:mythtv /home/mythtv/.mythtv
fi
ln -s /etc/lircrc /home/mythtv/.mythtv/lircrc 2> /dev/null
fi
#standard location for lircrc
- if [ ! -e /home/mythtv/.lircrc ]
- then
+ if [ ! -e /home/mythtv/.lircrc ]; then
ln -s /etc/lircrc /home/mythtv/.lircrc 2> /dev/null
fi
# echo "Sending hup to lircd"
@@ -141,16 +136,14 @@ function setup_lcd () {
x) echo "empty lcd" ;;
*) echo "setup lcd"
- if [ -f $TEMPLATES/LCD/$LCDtype/modules ]
- then
+ if [ -f $TEMPLATES/LCD/$LCDtype/modules ]; then
sed -i -e '/.*#LCD/d' ${BASE}/etc/modules.mythvantage
cat $TEMPLATES/LCD/$LCDtype/modules >> ${BASE}/etc/modules.mythvantage
#should also modprobe
fi
- if [ -f $TEMPLATES/LCD/$LCDtype/LCDd.conf ]
- then
+ if [ -f $TEMPLATES/LCD/$LCDtype/LCDd.conf ]; then
cp_and_log $TEMPLATES/LCD/$LCDtype/LCDd.conf /etc
# install="lcdproc $install"
daemon_add="lcdd $daemon_add"
@@ -160,10 +153,8 @@ function setup_lcd () {
fi
#check if lirc capable,if so then call setupremote
#if not in tinker mode check for remote
- if [ ! x$Remotetype = xtinker ]
- then
- if [ -f $TEMPLATES/LCD/$LCDtype/lircrc ]
- then
+ if [ "$Remotetype" != "tinker" ]; then
+ if [ -f $TEMPLATES/LCD/$LCDtype/lircrc ]; then
cd $TEMPLATES/LCD/$LCDtype
for i in lircd*
do
@@ -182,18 +173,15 @@ function setup_lcd () {
}
function setup_blaster_proto () {
- if [ x$HostBlasterType = x ]
- then
+ if [ "$HostBlasterType" == "" ]; then
HostBlasterType = "crap"
fi
- if [ ! $HostBlasterType = pvr150 -a ! $HostBlasterType = None ]
- then
+ if [[ ("$HostBlasterType" != "pvr150") && ("$HostBlasterType" != "None") ]]; then
for i in `seq $Hostnumblaster`
do
TEMP=HostTransmitproto_$i
eval proto=\$${TEMP}
- if [ -f $TEMPLATES/transmit/${proto}/lircd.conf ]
- then
+ if [ -f $TEMPLATES/transmit/${proto}/lircd.conf ]; then
include_lirc ${BASE}/etc/lircd.conf $TEMPLATES/transmit/${proto}/lircd.conf
fi
done
@@ -207,8 +195,7 @@ function setup_blaster_proto () {
function setup_blaster_transmiter () {
echo "setup_blaster_transmiter"
#if it's Reciever type, then these modules have already been loaded.
- if [ ! x$HostBlasterType = xReceiver ]
- then
+ if [ "$HostBlasterType" != "Receiver" ]; then
case $HostBlasterType in
None) echo "no blaster"
sed -i -e '/.*#blaster/d' ${BASE}/etc/modules.mythvantage
@@ -235,8 +222,7 @@ function setup_blaster_transmiter () {
}
function setupir () {
- if [ ! x$Remotetype = xtinker ]
- then
+ if [ "$Remotetype" != "tinker" ]; then
setup_ir_remote
setup_ir_receiver
unload_all_lirc