diff options
-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 |