summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-09-04 21:44:44 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-09-04 21:44:44 (GMT)
commit1feb03b69379907e985007f82e655d12dcae1ccd (patch)
treecf87260761745463adb57f1d433fb17359df11d1 /abs/core/LinHES-system
parentedb4961838ef76194ca2d2c8892031f1ea7e7e1f (diff)
downloadlinhes_pkgbuild-1feb03b69379907e985007f82e655d12dcae1ccd.zip
linhes_pkgbuild-1feb03b69379907e985007f82e655d12dcae1ccd.tar.gz
linhes_pkgbuild-1feb03b69379907e985007f82e655d12dcae1ccd.tar.bz2
Merge remote-tracking branch 'origin/testing' into testing
# By Britney Fransen (14) and others # Via Britney Fransen * origin/testing: (21 commits) LinHES-system: misc_status_config.py: add SystemType check and only update db for Standalone and masterbackend LinHES-system: mythfrontend-start: fork start command so that mythfrontend-start will exit. closes #847 mythtv: fixed and cleaned some menus. Closes #846 v4l-dvb: fix conflicting kernel modules. refs #844 mythdb-initial: add MiscStatusScript value to initial db. refs #845. LinHES-system: remove dup .install keylaunch: update .keylaunchrc to run mythtv-setup as user rsyslog: increase log retention to 2 weeks runit-scripts: enable cron logging to syslog premake:initial inclusion. closes #801 libaacs-git:initial inclusion. closes #801 aacskeys:initial inclusion. closes #801 LinHES-system: Add scripts for misc status in MythWeb. closes #845. linhes-scripts: tweak myth2mkv. Update version to 0.25-004 dvb-firmware: add xc5000c firmware. change xc5000 modprobe options. closes #844 v4l-dvb: update to snapshot from 20120828. refs #844 LinHES-system: update myth_status.py to work with tuners in error. closes #843 curlftpfs: Initial Inclusion. linhes-scripts: minor changes to myth2mkv mythtv:Bumped to latest fixes. Added ./configure items to close #842. ... Conflicts: abs/core/LinHES-config/LinHES-release abs/core/LinHES-config/PKGBUILD abs/core/LinHES-system/PKGBUILD abs/core/LinHES-system/misc_status_config.py abs/core/keylaunch/PKGBUILD abs/core/linhes-scripts/PKGBUILD abs/core/mythdb-initial/PKGBUILD abs/core/mythdb-initial/mc.sql abs/core/mythtv/stable-0.25/mythtv/PKGBUILD abs/core/rsyslog/PKGBUILD abs/core/runit-scripts/PKGBUILD
Diffstat (limited to 'abs/core/LinHES-system')
-rwxr-xr-xabs/core/LinHES-system/misc_status_config.py37
1 files changed, 31 insertions, 6 deletions
diff --git a/abs/core/LinHES-system/misc_status_config.py b/abs/core/LinHES-system/misc_status_config.py
index 0a0ba6c..cc82534 100755
--- a/abs/core/LinHES-system/misc_status_config.py
+++ b/abs/core/LinHES-system/misc_status_config.py
@@ -7,9 +7,34 @@ from MythTV import MythDB
mythdb = MythDB()
localhostname = gethostname()
-# mythtv-setup
-if mythdb.settings[localhostname].MiscStatusScript == u'':
- mythdb.settings[localhostname].MiscStatusScript = u'/usr/LH/bin/misc_status_info.sh'
- print 'The MythTV database setting MiscStatusScript was updated to /usr/LH/bin/misc_status_info.sh.'
-else:
- print 'The MythTV database setting MiscStatusScript is already set and will not be updated.'
+# Function to set db setting. This setting is set in mythtv-setup.
+def dbSettingChange():
+ if mythdb.settings[localhostname].MiscStatusScript == u'':
+ mythdb.settings[localhostname].MiscStatusScript = u'/usr/LH/bin/misc_status_info.sh'
+ print 'The MythTV database setting MiscStatusScript was updated to /usr/LH/bin/misc_status_info.sh.'
+ else:
+ print 'The MythTV database setting MiscStatusScript is already set and will not be updated.'
+ return
+
+#taken from systemconfig.py
+#this is how you populate the dict
+systemconfig = {}
+file_name = "/etc/systemconfig"
+try:
+ config_file = open(file_name)
+except:
+ logging.critical("%s could not be opened", file_name)
+ sys.exit(1)
+
+for line in config_file:
+ line = line.strip()
+ if line and line[0] is not "#" and line[-1] is not "=":
+ var, val = line.rsplit("=", 1)
+ val = val.strip('"')
+ systemconfig[var.strip()] = val.strip()
+
+#this is how you reference a value from mv_hostype.py
+if (systemconfig.get("SystemType") == "Standalone"):
+ dbSettingChange()
+elif systemconfig.get("SystemType") == "Master_backend":
+ dbSettingChange()