summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/mv_hostype.py
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-config/mv_hostype.py')
-rwxr-xr-xabs/core/LinHES-config/mv_hostype.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/abs/core/LinHES-config/mv_hostype.py b/abs/core/LinHES-config/mv_hostype.py
index 1a108af..fd04a18 100755
--- a/abs/core/LinHES-config/mv_hostype.py
+++ b/abs/core/LinHES-config/mv_hostype.py
@@ -61,13 +61,13 @@ def setup_mysqlnetwork(EnableNetwork):
def setup_mysql_connection(systemconfig):
logging.info(" Configuring database connection")
- mythip = systemconfig["mythip"]
- systemtype = systemconfig["SystemType"]
- mv_root = systemconfig["MVROOT"]
+ mythip = systemconfig.get("mythip")
+ systemtype = systemconfig.get("SystemType")
+ mv_root = systemconfig.get("MVROOT")
mysqltxt = "/usr/share/mythtv/mysql.txt"
- templates = systemconfig["TEMPLATES"]
+ templates = systemconfig.get("TEMPLATES")
mysqltemplate = templates + "/mysql.txt"
- dbhost = systemconfig["dbhost"]
+ dbhost = systemconfig.get("dbhost")
if systemtype == "Master_backend":
logging.debug(" Setting dbhost to %s in systemconfig", mythip)
@@ -135,23 +135,23 @@ def hostypeprint(systemconfig):
daemon_remove_list=''
run_mysqlnetwork = False
- if systemconfig["SystemType"] == "Standalone":
+ if systemconfig.get("SystemType") == "Standalone":
logging.info("Stand alone system being configured")
setup_ntp(False,"null")
remove_avahi_service()
EnableNetwork = False
run_mysqlnetwork = True
- if systemconfig["hostypec"]:
+ if systemconfig.get("hostypec"):
setup_db()
install_list=["mysql", "mythdb-initial", "avahi", "rpcbind", "nfs-utils", "local-website", "myth2ipod", "mythtv-status"]
daemon_list=["mysql", "mythbackend", "avahi", "rpcbind", "nfs-common", "netfs", "lighttpd"]
if data_config.SYSTEMTYPE == "MythVantage":
install_list.append('ghosd')
- elif systemconfig["SystemType"] == "Master_backend":
+ elif systemconfig.get("SystemType") == "Master_backend":
logging.info("Master backend system being configured")
setup_ntp(False,"null")
- setup_avahi(systemconfig["TEMPLATES"])
+ setup_avahi(systemconfig.get("TEMPLATES"))
install_list=["mysql", "mythdb-initial", "avahi", "rpcbind", "nfs-utils", "local-website", "myth2ipod", "mythtv-status"]
daemon_list=["mysql", "mythbackend", "avahi", "rpcbind", "nfs-common", "netfs", "lighttpd"]
EnableNetwork = True
@@ -163,11 +163,11 @@ def hostypeprint(systemconfig):
daemon_list.append('certmaster')
install_list.append('ghosd')
- elif systemconfig["SystemType"] == "Slave_backend":
+ elif systemconfig.get("SystemType") == "Slave_backend":
logging.info("Slave backend system being configured")
- setup_ntp(True,systemconfig["dbhost"])
+ setup_ntp(True,systemconfig.get("dbhost"))
remove_avahi_service()
- if systemconfig["hostypec"]:
+ if systemconfig.get("hostypec"):
setup_db()
install_list = ["rpcbind", "nfs-utils", "local-website", "avahi", "libmysqlclient" ]
daemon_list = ["mythbackend", "rpcbind", "nfs-common", "netfs", "lighttpd", "avahi" ]
@@ -181,9 +181,9 @@ def hostypeprint(systemconfig):
install_list.append('ghosd')
- elif systemconfig["SystemType"] == "Frontend_only":
+ elif systemconfig.get("SystemType") == "Frontend_only":
logging.info("Frontend only system being configured")
- setup_ntp(True,systemconfig["dbhost"])
+ setup_ntp(True,systemconfig.get("dbhost"))
remove_avahi_service()
install_list=["mysql-clients", "libmysqlclient", "avahi", "rpcbind", "nfs-utils", "local-website"]
remove_list=["mysql"]
@@ -206,7 +206,7 @@ def hostypeprint(systemconfig):
mv_common.add_service(daemon)
for daemon in daemon_remove_list:
mv_common.remove_service(daemon)
- if systemconfig["RunFrontend"] == "1":
+ if systemconfig.get("RunFrontend") == "1":
logging.debug(" Will run the frontend")
mv_common.add_service("frontend")
mv_common.add_service("hal")
@@ -227,7 +227,7 @@ def hostypeprint(systemconfig):
setup_mysql_connection(systemconfig)
if data_config.SYSTEMTYPE == "MythVantage":
- setup_func_minion(systemconfig["dbhost"])
+ setup_func_minion(systemconfig.get("dbhost"))
setup_func_key()
- setup_syslog(systemconfig["dbhost"])
+ setup_syslog(systemconfig.get("dbhost"))
logging.info("__End of hostype config\n")