summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/mv_ir.py
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2012-03-10 00:17:16 (GMT)
committerBritney Fransen <brfransen@gmail.com>2012-03-10 00:17:16 (GMT)
commit42b8b3173f9d29f42b77b5a63336b3cb22a9852f (patch)
tree3a67c3af57acf8ce0288171ebaedb48b3c0e9425 /abs/core/LinHES-config/mv_ir.py
parent7c8bcf3d9c4aef62780f090e963d0a94ff9bdf36 (diff)
downloadlinhes_pkgbuild-42b8b3173f9d29f42b77b5a63336b3cb22a9852f.zip
linhes_pkgbuild-42b8b3173f9d29f42b77b5a63336b3cb22a9852f.tar.gz
linhes_pkgbuild-42b8b3173f9d29f42b77b5a63336b3cb22a9852f.tar.bz2
LinHES-config: mv_ir.py: add remote.run for specific remote starting commands. refs #821
Diffstat (limited to 'abs/core/LinHES-config/mv_ir.py')
-rwxr-xr-xabs/core/LinHES-config/mv_ir.py24
1 files changed, 21 insertions, 3 deletions
diff --git a/abs/core/LinHES-config/mv_ir.py b/abs/core/LinHES-config/mv_ir.py
index 0e54f92..a4c3bed 100755
--- a/abs/core/LinHES-config/mv_ir.py
+++ b/abs/core/LinHES-config/mv_ir.py
@@ -44,7 +44,7 @@ def setup_lirc_links(mythhome):
else:
logging.debug(" %s/.lircrc already present",mythhome)
else:
- logging.debug(" /etc/lircrc does not exisit, can not link it")
+ logging.debug(" /etc/lircrc does not exist, can not link it")
def scrub_modules(filename,module):
logging.debug(" scrubbing %s from %s",module,filename)
@@ -92,6 +92,8 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType):
mv_common.runcmd(cmd)
cmd = "mv /etc/lircrc /etc/lircrc-%s" %currenttime
mv_common.runcmd(cmd)
+ cmd = "mv /etc/remote.run /etc/remote.run-%s" %currenttime
+ mv_common.runcmd(cmd)
if os.path.isdir(mythhome+"/remotes/"+Remotetype):
@@ -113,6 +115,14 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType):
logging.debug(" %s is a dir, skipping",filename)
continue
include_file("/etc/lircrc",filename)
+ files = mythhome + "/remotes/" + Remotetype + "/remote.run*"
+ 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
+ include_file("/etc/remote.run",filename)
else:
#template dir
files = templates + "/remotes/" + Remotetype + "/lircd*"
@@ -131,9 +141,17 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType):
logging.debug(" %s is a dir, skipping",filename)
continue
include_file("/etc/lircrc",filename)
+ files = templates + "/remotes/" + Remotetype + "/remote.run*"
+ 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
+ include_file("/etc/remote.run",filename)
- cmd = "chmod 755 /etc/lircrc"
+ cmd = "chmod 755 /etc/lircrc /etc/remote.run"
mv_common.runcmd(cmd)
mv_common.add_service("lircd")
@@ -365,4 +383,4 @@ def setup_ir(systemconfig, data_config):
else:
logging.debug(" LCD not defined")
logging.info("__End IR\n")
- return rc \ No newline at end of file
+ return rc