[PATCH aeolus-configure] BZ#852511 - aeolus-services prints "stoping <service>" instead of "stopping <service>"

Jason Guiditta jguiditt at redhat.com
Tue Sep 4 18:12:11 UTC 2012


On 04/09/12 10:59 -0500, Steve Linabery wrote:
>Fixes https://bugzilla.redhat.com/show_bug.cgi?id=852511 by putting action
>messages in a hash instead of creating them by appending 'ing' to the action
>string.
>---
> bin/aeolus-services |    6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
>diff --git a/bin/aeolus-services b/bin/aeolus-services
>index 2becbfd..adfc9a8 100755
>--- a/bin/aeolus-services
>+++ b/bin/aeolus-services
>@@ -37,10 +37,14 @@ end
> # ordered as in rc.d
> $services = %w(mongod iwhd postgresql httpd deltacloud-core libvirtd aeolus-conductor conductor-dbomatic imagefactory ntpd)
>
>+$action_messages = {'status' => 'Checking status of',
>+                    'start'  => 'Starting',
>+                    'stop'   => 'Stopping'}
>+
> def perform(action, svcs)
>   action = action.to_s
>   svcs.map do |script|
>-    puts "\n#{action.capitalize}ing #{script} ..."
>+    puts "\n#{$action_messages[action]} #{script} ..."
>     cmd = "service #{script} #{action}"
>     out = `#{cmd}`
>     if $?.to_i == 0
>-- 
>1.7.7.6
>

ACK, this seems to do as described.

-j



More information about the aeolus-devel mailing list