diff options
author | Guido Günther <agx@sigxcpu.org> | 2010-09-25 14:58:27 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2010-09-25 14:58:27 +0200 |
commit | 62e967452e02d81abfb06c30272145b88ba6d42f (patch) | |
tree | 2291d8bec356a2ae43163a3e0b651f17e342e3b8 /whatmaps | |
parent | ed0860e574333a1304118b6e6306108168104286 (diff) |
Implement service restart for RedHat based distros
Diffstat (limited to 'whatmaps')
-rwxr-xr-x | whatmaps | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -107,7 +107,7 @@ class Distro(object): @classmethod def restart_service(klass, service): """Restart a service""" - raise NotImplementedError + subprocess.call(klass.restart_service_cmd(service)) @classmethod def pkg_services(klass, pkg): @@ -203,10 +203,6 @@ class DebianDistro(Distro): return ['invoke-rc.d', name, 'restart'] @classmethod - def restart_service(klass, name): - subprocess.call(klass.restart_service_cmd(name)) - - @classmethod def has_apt(klass): return True @@ -347,6 +343,10 @@ class RedHatDistro(Distro): pkg = output.strip() return RpmPkg(pkg) + @classmethod + def restart_service_cmd(klass, name): + return ['service', name, 'restart'] + class FedoraDistro(RedHatDistro): id = 'Fedora' |