summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/mv_common.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2011-12-08 22:18:56 (GMT)
committerJames Meyer <james.meyer@operamail.com>2011-12-08 22:18:56 (GMT)
commitc0d6b85efd2c93411be26976412e0fd8924d62a0 (patch)
tree5f50dec5f25312e91a52a359f169986eec823cdb /abs/core/LinHES-config/mv_common.py
parent11b3a83607f4c6abf84875a22d36ab6593c831d8 (diff)
downloadlinhes_pkgbuild-c0d6b85efd2c93411be26976412e0fd8924d62a0.zip
linhes_pkgbuild-c0d6b85efd2c93411be26976412e0fd8924d62a0.tar.gz
linhes_pkgbuild-c0d6b85efd2c93411be26976412e0fd8924d62a0.tar.bz2
LinHES-config: move network module to top of the list. When multiple modules are run and network is in the list, network will run first.
-Add support for creating the .mythtv dir if it's not present -simple logic to catch an error if the network can not be reached, when checking for extra support for func,xymon.
Diffstat (limited to 'abs/core/LinHES-config/mv_common.py')
-rwxr-xr-xabs/core/LinHES-config/mv_common.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/abs/core/LinHES-config/mv_common.py b/abs/core/LinHES-config/mv_common.py
index 0f78312..b5939f2 100755
--- a/abs/core/LinHES-config/mv_common.py
+++ b/abs/core/LinHES-config/mv_common.py
@@ -108,6 +108,25 @@ def link_file(srcfile,link_name):
return
+def mkdir_mythhome(mythhome):
+ if not os.path.exists(mythhome+"/.mythtv"):
+ logging.debug(" Creating %s/.mythtv",mythhome)
+ try:
+ os.mkdir(mythhome+"/.mythtv")
+ except:
+ logging.debug(" Couldn't create .mythtv ")
+ return
+ try:
+ os.chown(mythhome+"/.mythtv", mythuid, mythgid)
+ logging.debug("* Couldn't chown of %s", mythhome)
+ except:
+ cmd = ''' chown -R mythtv %s/.mythtv''' %mythhome
+ runcmd(cmd)
+ cmd = ''' chgrp -R mythtv %s/.mythtv''' %mythhome
+ runcmd(cmd)
+ pass
+
+
def add_service(daemon):
logging.info(" Adding service %s",daemon)