diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-08-29 19:24:49 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-08-29 19:24:49 +0000 |
commit | f7e4ccb9b3c95adaf6e474395b268a5b9a322535 (patch) | |
tree | 056314fb5b431b733daa9200f2e50087236bbd47 /src/lib/Client/Solaris.py | |
parent | 55ccfdc79fbc77ebb802df6cfbcd1b573ca9adc9 (diff) | |
download | bcfg2-f7e4ccb9b3c95adaf6e474395b268a5b9a322535.tar.gz bcfg2-f7e4ccb9b3c95adaf6e474395b268a5b9a322535.tar.bz2 bcfg2-f7e4ccb9b3c95adaf6e474395b268a5b9a322535.zip |
Make service restarts tunable across platforms
* Remove hardcoded /etc/init.d calls in Toolset.py
* Add an overloadable method
* Implement the method for Solaris.py
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2141 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Solaris.py')
-rw-r--r-- | src/lib/Client/Solaris.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/Client/Solaris.py b/src/lib/Client/Solaris.py index cc2f0627b..36f59c1d1 100644 --- a/src/lib/Client/Solaris.py +++ b/src/lib/Client/Solaris.py @@ -223,3 +223,11 @@ class ToolsetImpl(Toolset): unlink(self.noaskname) except: pass + + def RestartService(self, service): + '''Restart a service''' + if service.get("FMRI").startswith('lrc'): + Toolset.RestartService(self, service) + else: + self.logger.debug("Restarting service %s" % (service.get("FMRI"))) + self.saferun("svcadm disable %s" % (service.get("FMRI")) |