summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/mv_ir.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-11-19 23:31:04 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-11-19 23:31:04 (GMT)
commitaa09e0ff9b2d0ed05a4bd0ebe9bf3581b581327d (patch)
treede5b78be1b64642988494739174908827bcdb950 /abs/core/LinHES-config/mv_ir.py
parent8b961222f7f80b5f253e7ef09f97cf3138f0ef63 (diff)
downloadlinhes_pkgbuild-aa09e0ff9b2d0ed05a4bd0ebe9bf3581b581327d.zip
linhes_pkgbuild-aa09e0ff9b2d0ed05a4bd0ebe9bf3581b581327d.tar.gz
linhes_pkgbuild-aa09e0ff9b2d0ed05a4bd0ebe9bf3581b581327d.tar.bz2
LinHES-config: mv_ir.py add support for remotes needing their own modprode.d/conf file.
refs #854
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"),