summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xabs/core/LinHES-config/timezip.py41
1 files changed, 40 insertions, 1 deletions
diff --git a/abs/core/LinHES-config/timezip.py b/abs/core/LinHES-config/timezip.py
index 4e494be..625350b 100755
--- a/abs/core/LinHES-config/timezip.py
+++ b/abs/core/LinHES-config/timezip.py
@@ -27,6 +27,8 @@ def printvars():
print "nfstoggle:" + nfstoggle
print "nfsmount:" + nfsmount
print "hobbitclient:" + hobbitclient
+ print "windowmanager:" + windowmanager
+ print "windowmanager style:" + wmstyle
# connect
def selectvars():
@@ -39,6 +41,8 @@ def selectvars():
global nfstoggle
global nfsmount
global hobbitclient
+ global windowmanager
+ global wmstyle
db = MySQLdb.connect(host=masterdb, user="mythtv", passwd="mythtv", db="mythconverg")
# create a cursor
@@ -112,6 +116,21 @@ def selectvars():
hobbitclient="1"
+ cursor.execute("select data from settings where value='HostWindowManager' and hostname=(%s)",(BEhostname))
+ result = cursor.fetchone()
+ try:
+ windowmanager=result[0]
+ except TypeError:
+ windowmanager="default"
+
+ cursor.execute("select data from settings where value='HostEnhancedWMStyle' and hostname=(%s)",(BEhostname))
+ result = cursor.fetchone()
+ try:
+ wmstyle=result[0]
+ except TypeError:
+ wmstyle="0"
+
+
def insertvars():
db = MySQLdb.connect(host=installdb, user="mythtv", passwd="mythtv", db="mythconverg")
@@ -193,6 +212,26 @@ def insertvars():
cursor.execute("update settings set data=(%s) where hostname=(%s) and value='HostServiceHobbitclient'",(hobbitclient,thishostname))
print "updating hobbitclient"
+ #windowmanager
+ cursor.execute("select * from settings where value='HostWindowManager' and hostname=(%s)",(thishostname))
+ result = cursor.fetchone()
+ if (result == None):
+ cursor.execute("INSERT INTO settings (value,data,hostname) VALUES ('HostWindowManager',(%s),(%s))",(windowmanager,thishostname))
+ print "inserting windowmanager"
+ else:
+ cursor.execute("update settings set data=(%s) where hostname=(%s) and value='HostWindowManager'",(windowmanager,thishostname))
+ print "updating windowmanager"
+
+
+ cursor.execute("select * from settings where value='HostEnhancedWMStyle' and hostname=(%s)",(thishostname))
+ result = cursor.fetchone()
+ if (result == None):
+ cursor.execute("INSERT INTO settings (value,data,hostname) VALUES ('HostEnhancedWMStyle',(%s),(%s))",(wmstyle,thishostname))
+ print "inserting windowmanager style"
+ else:
+ cursor.execute("update settings set data=(%s) where hostname=(%s) and value='HostEnhancedWMStyle'",(wmstyle,thishostname))
+ print "updating windowmanager style"
+
def main(argv):
global masterdb
@@ -204,9 +243,9 @@ def main(argv):
global tz
global tz_region
global tz_subregion
-
global nfsip
global hobbitclient
+
try:
opts, args = getopt.getopt(argv, "hm:d:n:", ["help", "masterdb=", "installdb=" , "hostname=" ] )
except getopt.GetoptError: