summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/mv_ir.py
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-config/mv_ir.py')
-rwxr-xr-xabs/core/LinHES-config/mv_ir.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/abs/core/LinHES-config/mv_ir.py b/abs/core/LinHES-config/mv_ir.py
index d77f64f..f481fa4 100755
--- a/abs/core/LinHES-config/mv_ir.py
+++ b/abs/core/LinHES-config/mv_ir.py
@@ -136,6 +136,48 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType,remotebucket):
cmd = "cp %s /etc/remote.run" %filename
mv_common.runcmd(cmd)
+ #if remote has a special xbmc file, use it.
+ xbmcfile= remote_path + "/xbmc.xml"
+ userxmbcfile = mythhome+"/.xbmc/userdata/Lircmap.xml"
+
+ if os.path.exists(xbmcfile):
+ logging.debug(" XBMC lirc file present")
+ logging.info(" Setting up lirc for xbmc")
+ if not os.path.exists(mythhome+"/.xbmc/userdata"):
+ logging.debug(" Creating %s/.xbmc",mythhome)
+ try:
+ os.mkdir(mythhome+"/.xbmc")
+ except:
+ logging.debug(" Couldn't create .xbmc/ ")
+ try:
+ os.mkdir(mythhome+"/.xbmc/userdata/")
+ except:
+ logging.debug(" Couldn't create .xbmc/userdata ")
+
+ try:
+ cmd = ''' chown -R mythtv %s/.xbmc''' %mythhome
+ mv_common.runcmd(cmd)
+ cmd = ''' chgrp -R mythtv %s/.xbmc/userdata''' %mythhome
+ mv_common.runcmd(cmd)
+ except:
+ logging.debug(" Couldn't change permissions for .xbmc")
+ pass
+ try:
+ cmd = ''' rm -f %s''' %(userxmbcfile)
+ mv_common.runcmd(cmd)
+ logging.debug(" Creating symlink for xmbc lircrc")
+ os.symlink(xbmcfile, mythhome+"/.xbmc/userdata/Lircmap.xml")
+ except:
+ pass
+ else:
+ logging.debug(" XBMC lirc file %s not present" %xbmcfile)
+
+
+
+
+
+
+
#remote has it's own modprobe.d/conf filename
cmd = "rm -f /etc/modprobe.d/mv_ir.conf"
mv_common.runcmd(cmd)