summaryrefslogtreecommitdiffstats
path: root/abs/core-testing
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-06-04 15:09:41 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-06-04 15:09:41 (GMT)
commit07d0be031e4db6460d6c22cb3775cd2e977e163e (patch)
tree6cdda89e051526dbea839a5b32e7806256123f90 /abs/core-testing
parentdd2c1f96b8c3e06d26cc8a1f9c3d82ff6a20a39a (diff)
downloadlinhes_pkgbuild-07d0be031e4db6460d6c22cb3775cd2e977e163e.zip
linhes_pkgbuild-07d0be031e4db6460d6c22cb3775cd2e977e163e.tar.gz
linhes_pkgbuild-07d0be031e4db6460d6c22cb3775cd2e977e163e.tar.bz2
linhes-config: add several service calls for sv
restart lcdd using the the service calls
Diffstat (limited to 'abs/core-testing')
-rwxr-xr-xabs/core-testing/LinHES-config/mv_common.py32
-rwxr-xr-xabs/core-testing/LinHES-config/mv_ir.py1
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):