diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2011-04-12 10:18:55 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2011-04-12 10:18:55 -0500 |
commit | 545dda76d34a06ae25efa2eb3d0c8c0bd70127d0 (patch) | |
tree | 7e11617f4d81465c8a75ee343e550bb424ac3730 /src/lib/Client/Tools/DebInit.py | |
parent | 33d4e0178b26dc4756a4b933a9f966379ce99453 (diff) | |
download | bcfg2-545dda76d34a06ae25efa2eb3d0c8c0bd70127d0.tar.gz bcfg2-545dda76d34a06ae25efa2eb3d0c8c0bd70127d0.tar.bz2 bcfg2-545dda76d34a06ae25efa2eb3d0c8c0bd70127d0.zip |
Tools: Skip Installation for mode='manual' services (#965)
This allows for verification of specified services, but skips
installation completely when mode is set to manual. This means that
incorrect services will still show up in reports, but they won't be
modified in an automated way.
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/lib/Client/Tools/DebInit.py')
-rw-r--r-- | src/lib/Client/Tools/DebInit.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/Client/Tools/DebInit.py b/src/lib/Client/Tools/DebInit.py index fc67a73e4..254b55d98 100644 --- a/src/lib/Client/Tools/DebInit.py +++ b/src/lib/Client/Tools/DebInit.py @@ -75,6 +75,11 @@ class DebInit(Bcfg2.Client.Tools.SvcTool): def InstallService(self, entry): """Install Service for entry.""" + # don't take any actions for mode='manual' + if entry.get('mode', 'default') == 'manual': + self.logger.info("Service %s mode set to manual. Skipping " + "installation." % (entry.get('name'))) + return True self.logger.info("Installing Service %s" % (entry.get('name'))) try: os.stat('/etc/init.d/%s' % entry.get('name')) |