From 958a4c40386321b8c9008c42afd6d911d9009962 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Thu, 4 Jun 2009 08:41:18 -0500
Subject: LinHes-config:  Removing unused files

---
 abs/core-testing/LinHES-config/hostype.py | 147 ------------------------------
 abs/core-testing/LinHES-config/ir.py      |  41 ---------
 abs/core-testing/LinHES-config/webuser.py |  23 -----
 3 files changed, 211 deletions(-)
 delete mode 100644 abs/core-testing/LinHES-config/hostype.py
 delete mode 100644 abs/core-testing/LinHES-config/ir.py
 delete mode 100644 abs/core-testing/LinHES-config/webuser.py

diff --git a/abs/core-testing/LinHES-config/hostype.py b/abs/core-testing/LinHES-config/hostype.py
deleted file mode 100644
index 0bbd16e..0000000
--- a/abs/core-testing/LinHES-config/hostype.py
+++ /dev/null
@@ -1,147 +0,0 @@
-# -*- coding: utf-8 -*-
-import logging, mv_common
-import os
-
-config_file = "mv_config"
-data_config = __import__(config_file, globals(), locals(), [])
-
-def setup_ntp(usepool,ntpserver):
-    if usepool:
-        logging.info("Setting ntp server to %s",ntpserver)
-        print '''sed -i "s/pool.ntp.org/$dbhost/g" ${BASE}/etc/ntp.conf'''
-    else:
-        logging.info("Not changing ntp configuration")
-
-def setup_avahi(templates):
-    file="/etc/avahi/services/mysql.service"
-    if not os.path.exists(file):
-        logging.debug("    copying in mysql.service for avahi")
-        try:
-            os.makedirs("/etc/avahi/services")
-        except:
-            logging.debug("    Couldn't create /etc/avahi/services")
-        mv_common.cp_and_log(template+"/mysql.service",file)
-        cmd="sudo sv restart avahi"
-        mv_common.runcmd(cmd)
-
-def remove_avahi_service():
-    file="/etc/avahi/services/mysql.service"
-    if os.path.exists(file):
-        logging.debug("    Removing avahi mysql.service file")
-        cmd="rm -rf %s" %file
-        runcmd(cmd)
-        cmd="sudo sv restart avahi"
-        mv_common.runcmd(cmd)
-
-def setup_db():
-    logging.debug("    Setting up the database")
-
-def setup_mysqlnetwork():
-    logging.debug("    Setting up mysql network")
-
-def setup_mysql():
-    logging.debug("    Configuring mysql")
-
-def setup_func_key():
-    if data_config.SYSTEMTYPE == "MythVantage":
-        logging.debug("    Grabbing the key for Func")
-        cmd="/usr/MythVantage/bin/grabkey.py"
-        mv_common.runcmd(cmd)
-
-def setup_func_minion(dbhost):
-    logging.info("    Setting up the func minion:")
-    logging.debug("   certmaster is %s:",dbhost)
-    cmd='''sed -i "s/^certmaster.*$/certmaster = %s/" /etc/func/minion.conf ''' %dbhost
-    mv_common.runcmd(cmd)
-
-def setup_syslog(dbhost):
-    logging.debug("    Setting syslog to log to %s",dbhost)
-    cmd ='''sed -i "s/^destination d_remote.*$/destination d_remote \{tcp\(\"%s\" port\(514\)\) \;\} \;/" /etc/syslog-ng.conf''' %dbhost
-    return
-
-def hostypeprint(systemconfig):
-    logging.info("______Start of hostype config_____")
-    mv_common.services(systemconfig)
-    install_list=''
-    remove_list=''
-    daemon_list=''
-    daemon_remove_list=''
-
-    if systemconfig["SystemType"] == "Standalone":
-        logging.info("Stand alone system being configured")
-        setup_ntp(False,"null")
-        remove_avahi_service()
-        if systemconfig["hostypec"]:
-            setup_db()
-        install_list=("mysql", "mythdb-initial", "avahi", "portmap", "nfs-utils", "local-website", "myth2ipod", "mythtv-status")
-        daemon_list=("mysql", "mythbackend", "avahi", "portmap", "nfs-utils", "netfs", "lighttpd")
-
-    elif systemconfig["SystemType"] == "Master_backend":
-        logging.info("Master backend system being configured")
-        setup_ntp(False,"null")
-        setup_avahi(systemconfig["TEMPLATES"])
-        install_list=("mysql", "mythdb-initial", "avahi", "portmap", "nfs-utils", "local-website", "myth2ipod", "mythtv-status")
-        daemon_list=("mysql", "mythbackend", "avahi", "portmap", "nfs-utils", "netfs", "lighttpd")
-        if data_config.SYSTEMTYPE == "MythVantage":
-            install_list.append('func')
-            install_list.append('certmaster')
-            daemon_list.append('certmaster')
-
-    elif systemconfig["SystemType"] == "Slave_backend":
-        logging.info("Slave backend  system being configured")
-        setup_ntp(True,systemconfig["dbhost"])
-        remove_avahi_service()
-        if systemconfig["hostypec"]:
-            setup_db()
-        install_list=("portmap", "nfs-utils", "local-website", "avahi", 'libmysqlclient')
-        daemon_list=("mythbackend", "portmap", "nfs-utils", "netfs", "lighttpd", "avahi")
-        daemon_remove_list=('mysql')
-        if data_config.SYSTEMTYPE == "MythVantage":
-            install_list.remove("local-website")
-            daemon_list.remove("lighttpd")
-            install_list.append('func')
-            daemon_list.append('funcd')
-            remove_list.append("lighttpd")
-
-
-    elif systemconfig["SystemType"] == "Frontend_only":
-        logging.info("Frontend only system being configured")
-        setup_ntp(True,systemconfig["dbhost"])
-        remove_avahi_service()
-        install_list=("mysql-clients", "libmysqlclient",  "avahi", "portmap", "nfs-utils", "local-website")
-        remove_list=("mysql")
-        daemon_list=("mysql", "mythbackend", "avahi", "portmap", "nfs-utils", "netfs", "lighttpd")
-        daemon_remove_list=("mysql", "mythbackend")
-        if data_config.SYSTEMTYPE == "MythVantage":
-            install_list.remove("local-website")
-            daemon_list.remove("lighttpd")
-            install_list.append('func')
-            daemon_list.append('funcd')
-            remove_list.append("lighttpd")
-
-
-
-    for pkg in install_list:
-        mv_common.pacinstall(pkg)
-    for pkg in remove_list:
-        mv_common.pacinstall(pkg)
-    for daemon in daemon_list:
-        mv_common.add_service(daemon)
-    for daemon in daemon_remove_list:
-        mv_common.remove_service(daemon)
-    if systemconfig["RunFrontend"] == "1":
-        logging.debug("   Will run the frontend")
-        mv_common.add_service("frontend")
-        mv_common.add_service("hal")
-    else:
-        logging.debug("   Will NOT run the frontend")
-        mv_common.remove_service("frontend")
-        mv_common.remove_service("hal")
-
-    setup_mysqlnetwork()
-    setup_mysql()
-    if data_config.SYSTEMTYPE == "MythVantage":
-        setup_func_minion(dbhost)
-        setup_func_key()
-        setup_syslog(systemconfig["dbhost"])
-    logging.info("__End of hostype config\n")
diff --git a/abs/core-testing/LinHES-config/ir.py b/abs/core-testing/LinHES-config/ir.py
deleted file mode 100644
index a6723ce..0000000
--- a/abs/core-testing/LinHES-config/ir.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- coding: utf-8 -*-
-import logging, mv_common
-import os, re
-
-def setup_ir(systemconfig, data_config):
-    logging.info("____Start of Software install____")
-    default_disabled = ("mythphone", "mytharchive", "mythbrowser", "mythnews",
-                        "mythgame", "mythflix", "mythweather",
-                        "mythappletrailers", "mythstream", "mythvodka")
-
-    default_installed=("mythcontrols", "mythgallery", "mythmovies",
-                        "mythmusic", "mythsmolt", "mythvideo")
-    other_pkg=("miro", "xe", "romdb", "xine", "dvdcss", "webmin")
-
-    for pkg in default_disabled:
-        try:
-            if systemconfig[pkg] == "1":
-                mv_common.pacinstall(pkg)
-            else:
-                mv_common.pacremove(pkg)
-        except:
-            logging.debug("  ERROR-- %s is not defined", pkg)
-
-    for pkg in default_installed:
-        try:
-            if systemconfig[pkg] == "0":
-                mv_common.pacremove(pkg)
-            else:
-                mv_common.pacinstall(pkg)
-        except:
-            logging.debug("  ERROR-- %s is not defined", pkg)
-
-    for pkg in other_pkg:
-        try:
-            if systemconfig[pkg] == "1":
-                mv_common.pacinstall(pkg)
-            elif systemconfig[pkg] == "0":
-                mv_common.pacremove(pkg)
-        except:
-            logging.debug("   ERROR-- %s is not defined", pkg)
-    logging.info("__End Software ")
\ No newline at end of file
diff --git a/abs/core-testing/LinHES-config/webuser.py b/abs/core-testing/LinHES-config/webuser.py
deleted file mode 100644
index 1a91bf2..0000000
--- a/abs/core-testing/LinHES-config/webuser.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-import logging, mv_common
-#import os
-
-
-config_file = "mv_config"
-data_config = __import__(config_file, globals(), locals(), [])
-
-def setup_web_auth(UseMythWEB_auth):
-    if UseMythWEB_auth == 1:
-        #enable auth
-        logging.info("Enabling authorization for mythweb")
-        cmd='''sed -ie "s/^.*include.*auth-inc.conf.*$/include \"\/etc\/lighttpd\/auth-inc.conf\"/g" /etc/lighttpd/lighttpd.conf'''
-        mv_common.runcmd(cmd)
-    else
-        #disable auth
-        logging.info("Disabling authorization for mythweb")
-        cmd='''sed -ie "s/^.*include.*auth-inc.conf.*$/#include \"\/etc\/lighttpd\/auth-inc.conf\"/g" /etc/lighttpd/lighttpd.conf'''
-        mv_common.runcmd(cmd)
-    logging.debug("Restarting lighttpd")
-    cmd="sudo sv restart lighttpd"
-    mv_common.runcmd(cmd)
-
-- 
cgit v0.12