diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2009-07-25 02:42:12 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2009-07-25 02:42:12 +0000 |
commit | dfbe98b1178c1283b894dc81187fb91aab178d68 (patch) | |
tree | ee97dd3b3b71b5f3ce646e11a5375023d51553fa /src/lib/Client/Tools/__init__.py | |
parent | 7632777cdaf499fb9fd8689a379ed6ae23d19da9 (diff) | |
download | bcfg2-dfbe98b1178c1283b894dc81187fb91aab178d68.tar.gz bcfg2-dfbe98b1178c1283b894dc81187fb91aab178d68.tar.bz2 bcfg2-dfbe98b1178c1283b894dc81187fb91aab178d68.zip |
Client tools: Prompt for service restart in Interactive mode (Patch from Leif Ryge)
This commit causes the client tools prompt for a service restart when
running in interactive mode. This keeps the client interface consistent
with what happens when installing other configuration types.
This commit also fixes ticket #605
Signed-off-by: Sol Jerome <solj@ices.utexas.edu>
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5385 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Tools/__init__.py')
-rw-r--r-- | src/lib/Client/Tools/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Client/Tools/__init__.py b/src/lib/Client/Tools/__init__.py index 9089260b0..105cff3cf 100644 --- a/src/lib/Client/Tools/__init__.py +++ b/src/lib/Client/Tools/__init__.py @@ -343,6 +343,10 @@ class SvcTool(Tool): if self.setup['servicemode'] == 'build': rc = self.stop_service(entry) else: + if self.setup['interactive']: + prompt = 'Restart service %s?: (y/N): ' % entry.get('name') + if raw_input(prompt) not in ['y', 'Y']: + continue rc = self.restart_service(entry) else: rc = self.stop_service(entry) |