summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-config/mv_ir.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-06-21 23:59:31 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-06-21 23:59:31 (GMT)
commitc9d85b81497f3036db26d3d481108072ba2ac560 (patch)
tree11fd73c4c6e54d35945424c765381ff1c00a56ec /abs/core-testing/LinHES-config/mv_ir.py
parent1baf8111524169f6d9349223e7764a43e2525a1a (diff)
downloadlinhes_pkgbuild-c9d85b81497f3036db26d3d481108072ba2ac560.zip
linhes_pkgbuild-c9d85b81497f3036db26d3d481108072ba2ac560.tar.gz
linhes_pkgbuild-c9d85b81497f3036db26d3d481108072ba2ac560.tar.bz2
LinHES-config: several minor fixes and finish some functions that slipped through the cracks.
introduce remove_file fix slave and fe only finish mysql_network_connection finish mysql_network fix ownership for .mythtv ir mv_ir fix myth_ip to always report the ip even if dhcp is used
Diffstat (limited to 'abs/core-testing/LinHES-config/mv_ir.py')
-rwxr-xr-xabs/core-testing/LinHES-config/mv_ir.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/abs/core-testing/LinHES-config/mv_ir.py b/abs/core-testing/LinHES-config/mv_ir.py
index efc8a60..b8e9741 100755
--- a/abs/core-testing/LinHES-config/mv_ir.py
+++ b/abs/core-testing/LinHES-config/mv_ir.py
@@ -3,9 +3,17 @@ import logging, mv_common
import os, re , glob
from time import time, localtime, strftime
import time
+import pwd
def setup_lirc_links(mythhome):
logging.debug(" Creating links for lirc")
+ try:
+ mythuid = pwd.getpwnam('mythtv')[2]
+ mythgid = pwd.getpwnam('mythtv')[3]
+ except:
+ logging.critical("* mythuid not found")
+ mythuid = '1000'
+ mythgid = '1000'
if not os.path.exists(mythhome+"/.mythtv"):
logging.debug(" Creating %s/.mythtv",mythhome)
try:
@@ -13,7 +21,15 @@ def setup_lirc_links(mythhome):
except:
logging.debug(" Couldn't create .mythtv ")
return
- os.chown(mythhome+"/.mythtv","mythtv","mythtv")
+ try:
+ os.chown(mythhome+"/.mythtv", mythuid, mythgid)
+ logging.debug("* Couldn't chown of %s", mythhome)
+ except:
+ cmd = ''' chown -R mythtv %s/.mythtv''' %mythhome
+ mv_common.runcmd(cmd)
+ cmd = ''' chgrp -R mythtv %s/.mythtv''' %mythhome
+ mv_common.runcmd(cmd)
+ pass
if not os.path.exists(mythhome+"/.mythtv/lircrc"):
logging.debug(" Creating symlink for myth lircrc")