diff options
Diffstat (limited to 'abs')
-rwxr-xr-x | abs/core-testing/LinHES-config/mv_common.py | 32 | ||||
-rwxr-xr-x | abs/core-testing/LinHES-config/mv_ir.py | 1 |
2 files changed, 32 insertions, 1 deletions
diff --git a/abs/core-testing/LinHES-config/mv_common.py b/abs/core-testing/LinHES-config/mv_common.py index 64ff2d6..0cbabf5 100755 --- a/abs/core-testing/LinHES-config/mv_common.py +++ b/abs/core-testing/LinHES-config/mv_common.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -import logging, os +import logging, os, time import commands config_file = "mv_config" data_config = __import__(config_file, globals(), locals(), []) @@ -37,6 +37,36 @@ def remove_service(daemon): cmd = "remove_service.sh %s" %daemon runcmd(cmd) +def start_service(daemon): + logging.info(" start service %s",daemon) + cmd = "sv start %s" %daemon + runcmd(cmd) + +def stop_service(daemon): + logging.info(" stop service %s",daemon) + cmd = "sv stop %s" %daemon + runcmd(cmd) + +def restart_service(daemon): + logging.info(" Restarting service %s",daemon) + if daemon == "lcdd": + stop_service(daemon) + logging.debug(" killing all lcdd") + cmd = "killall -9 LCDd" + runcmd(cmd) + time.sleep(2) + start_service(daemon) + else: + cmd = "sv restart %s" %daemon + runcmd(cmd) + +def hup_service(daemon): + logging.info(" hup service %s",daemon) + cmd = "sv hup %s" %daemon + runcmd(cmd) + + + def pkg_blacklist_check(pkg): cmd = '''grep -q %s /etc/blacklist.package''' %pkg rc = runcmd(cmd) diff --git a/abs/core-testing/LinHES-config/mv_ir.py b/abs/core-testing/LinHES-config/mv_ir.py index 6c2b2aa..6ce549f 100755 --- a/abs/core-testing/LinHES-config/mv_ir.py +++ b/abs/core-testing/LinHES-config/mv_ir.py @@ -248,6 +248,7 @@ def setup_lcd(LCDtype, TEMPLATES, Remotetype): mv_common.runcmd(cmd) mv_common.add_service("lcdd") + mv_common.restart_service("lcdd") logging.debug("__End of setup_lcd") def setup_ir(systemconfig, data_config): |