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.py27
1 files changed, 25 insertions, 2 deletions
diff --git a/abs/core/LinHES-config/mv_ir.py b/abs/core/LinHES-config/mv_ir.py
index f0863c4..658a118 100755
--- a/abs/core/LinHES-config/mv_ir.py
+++ b/abs/core/LinHES-config/mv_ir.py
@@ -56,8 +56,12 @@ def add_module(filename,module):
cmd = ''' echo "%s" >> %s ''' %(module,filename)
mv_common.runcmd(cmd)
-def unload_all_lirc():
+def unload_all_lirc(Remotetype):
logging.debug(" Unloading all remote modules")
+ #ati bucket specific
+ if "snapstream_firefly" in Remotetype :
+ cmd = "rmmod ati_remote"
+ mv_common.runcmd(cmd)
cmd = "sv stop remotes"
mv_common.runcmd(cmd)
cmd = "killall -9 lircd"
@@ -101,6 +105,7 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType,remotebucket):
files = remote_path + "/lircd*"
logging.debug(" Using %s",files)
+ # /etc/lircd.conf include
for filename in glob.glob(files):
# Ignore subfolders
if os.path.isdir (filename):
@@ -108,6 +113,8 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType,remotebucket):
continue
include_file("/etc/lircd.conf",filename)
#files = templates + "/remotes/" + Remotetype + "/lircrc*"
+
+ # inluce lircrc
files = remote_path + "/lircrc*"
logging.debug(" Using %s",files)
for filename in glob.glob(files):
@@ -116,6 +123,8 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType,remotebucket):
logging.debug(" %s is a dir, skipping",filename)
continue
include_file("/etc/lircrc",filename)
+
+ #if remote has a special run file use it.
files = remote_path + "/remote.run*"
logging.debug(" Using %s",files)
for filename in glob.glob(files):
@@ -126,7 +135,21 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType,remotebucket):
cmd = "cp %s /etc/remote.run" %filename
mv_common.runcmd(cmd)
+ #remote has it's own modprobe.d/conf filename
+ cmd = "rm -f /etc/modprobe.d/mv_ir.conf"
+ mv_common.runcmd(cmd)
+ files = remote_path + "/ir.conf*"
+ logging.debug(" Using %s",files)
+ for filename in glob.glob(files):
+ # Ignore subfolders
+ if os.path.isdir (filename):
+ logging.debug(" %s is a dir, skipping",filename)
+ continue
+ cmd = "cp %s /etc/modprobe.d/mv_ir.conf" %filename
+ mv_common.runcmd(cmd)
+
+ #cleanup
cmd = "chmod 755 /etc/lircrc /etc/remote.run"
mv_common.runcmd(cmd)
mv_common.add_service("remotes")
@@ -342,7 +365,7 @@ def setup_ir(systemconfig, data_config):
systemconfig.get("mythip"))
else:
setup_ir_receiver("unknown", systemconfig.get("TEMPLATES"),'','127.0.0.1')
- unload_all_lirc()
+ unload_all_lirc(remotetype)
setup_blaster_proto(HostBlasterType,
Hostnumblaster,
systemconfig.get("TEMPLATES"),