summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-config/systemconfig.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2010-03-28 00:54:01 (GMT)
committerJames Meyer <james.meyer@operamail.com>2010-03-28 00:54:01 (GMT)
commit26444d35e3ce38da0504600900d4775eb7a5970b (patch)
treeeb8fafbd5ffafc980925f3a8e57c117bc8daada0 /abs/core-testing/LinHES-config/systemconfig.py
parenta2c0883f206547f76d207a8477afc82a07cf0a30 (diff)
downloadlinhes_pkgbuild-26444d35e3ce38da0504600900d4775eb7a5970b.zip
linhes_pkgbuild-26444d35e3ce38da0504600900d4775eb7a5970b.tar.gz
linhes_pkgbuild-26444d35e3ce38da0504600900d4775eb7a5970b.tar.bz2
linhes-systemconfig: add ability to enable or disable modules based on configfile
/etc/mythvantage.cfg is the config file Changing any value to False will make systemconfig.py skip that module and print what section is being skipped. closes #663
Diffstat (limited to 'abs/core-testing/LinHES-config/systemconfig.py')
-rwxr-xr-xabs/core-testing/LinHES-config/systemconfig.py45
1 files changed, 30 insertions, 15 deletions
diff --git a/abs/core-testing/LinHES-config/systemconfig.py b/abs/core-testing/LinHES-config/systemconfig.py
index 28e2e7a..2e07b2f 100755
--- a/abs/core-testing/LinHES-config/systemconfig.py
+++ b/abs/core-testing/LinHES-config/systemconfig.py
@@ -36,8 +36,11 @@ def usage():
logging.info("tell people how to use this")
def setup_x(systemconfig):
- cmd = "%s/bin/xconfig.sh" %systemconfig["MVROOT"]
- mv_common.runcmd(cmd)
+ if mv_common.read_config(mv_common.module_config,"xorg") == False :
+ logging.info("____Skipping of Xorg, config disabled____")
+ else:
+ cmd = "%s/bin/xconfig.sh" %systemconfig["MVROOT"]
+ mv_common.runcmd(cmd)
def main(argv):
try:
@@ -124,23 +127,32 @@ def main(argv):
if cmdmodule["audio"] == True:
- logging.debug("______Start of Audio Configuration______")
- if not systemconfig["Audiotype"] == "tinker":
- cmd="%s/bin/soundconfig.sh -t real -i %s -d %s" %(MVROOT,systemconfig["Audiotype"],systemconfig["SoundDevice"])
- mv_common.runcmd(cmd)
+ if mv_common.read_config(mv_common.module_config,"audio") == False :
+ logging.info("____Skipping of Audio, config disabled____")
else:
- logging.debug(" Tinker mode(audio), not changing configuration")
- logging.debug("__End of audio")
+ logging.debug("______Start of Audio Configuration______")
+ if not systemconfig["Audiotype"] == "tinker":
+ cmd="%s/bin/soundconfig.sh -t real -i %s -d %s" %(MVROOT,systemconfig["Audiotype"],systemconfig["SoundDevice"])
+ mv_common.runcmd(cmd)
+ else:
+ logging.debug(" Tinker mode(audio), not changing configuration")
+ logging.debug("__End of audio")
if cmdmodule["misc"]:
- import mv_misc
- mv_misc.setup_zip(MVROOT,systemconfig["zipcode"])
- mv_misc.setup_tz(systemconfig["timezone"],systemconfig["TEMPLATES"])
- mv_misc.setup_nfs(systemconfig)
+ if mv_common.read_config(mv_common.module_config,"misc") == False :
+ logging.info("____Skipping of misc, config disabled____")
+ else:
+ import mv_misc
+ mv_misc.setup_zip(MVROOT,systemconfig["zipcode"])
+ mv_misc.setup_tz(systemconfig["timezone"],systemconfig["TEMPLATES"])
+ mv_misc.setup_nfs(systemconfig)
if cmdmodule["sleep"]:
- import mv_misc
- mv_misc.setup_sleep(systemconfig)
+ if mv_common.read_config(mv_common.module_config,"sleep") == False :
+ logging.info("____Skipping of sleep, config disabled____")
+ else:
+ import mv_misc
+ mv_misc.setup_sleep(systemconfig)
if cmdmodule["webuser"]:
import mv_webuser
@@ -163,7 +175,10 @@ def main(argv):
mv_software.setup_software(systemconfig, data_config)
if cmdmodule["advancedX"]:
- setup_x(systemconfig)
+ if mv_common.read_config(mv_common.module_config,"xorg") == False :
+ logging.info("____Skipping of advancedX, config disabled____")
+ else:
+ setup_x(systemconfig)
if cmdmodule["restartfe"]:
mv_common.restartfe(restartlcd)