diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2009-09-11 03:13:34 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2009-09-11 03:13:34 +0000 |
commit | 820672312e5b0f73043f2586537a2360b9e2a513 (patch) | |
tree | c53104d8f5dfb19c5e143f0d634460e80dcfe76e /src | |
parent | 155b1a8d2f5345c0cf6e90b88a5094fd97feb9fb (diff) | |
download | bcfg2-820672312e5b0f73043f2586537a2360b9e2a513.tar.gz bcfg2-820672312e5b0f73043f2586537a2360b9e2a513.tar.bz2 bcfg2-820672312e5b0f73043f2586537a2360b9e2a513.zip |
FreeBSDInit: Add check to see if we are on a FreeBSD system
Signed-off-by: Sol Jerome <solj@ices.utexas.edu>
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5430 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Client/Tools/FreeBSDInit.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/Client/Tools/FreeBSDInit.py b/src/lib/Client/Tools/FreeBSDInit.py index 5837cff37..a66ff61ed 100644 --- a/src/lib/Client/Tools/FreeBSDInit.py +++ b/src/lib/Client/Tools/FreeBSDInit.py @@ -5,6 +5,7 @@ __revision__ = '$Rev$' # - hardcoded path to ports rc.d # - doesn't know about /etc/rc.d/ +import os import Bcfg2.Client.Tools class FreeBSDInit(Bcfg2.Client.Tools.SvcTool): @@ -13,6 +14,10 @@ class FreeBSDInit(Bcfg2.Client.Tools.SvcTool): __handles__ = [('Service', 'freebsd')] __req__ = {'Service': ['name', 'status']} + def __init__(self, logger, cfg, setup): + if os.uname()[0] != 'FreeBSD': + raise Bcfg2.Client.Tools.toolInstantiationError + def VerifyService(self, entry, _): return True |