as far I see there have been a regression while refactoring the redhat service
provider to user /sbin/service. This commit fixes this bug (1426) and service
restarts are working again on redhat based systems.
There are no tests, as I couldn't figure out how that should be tested. It
seems that some restart logic is already tested, however it looks like not
every single kind of provider is covered by tests, nor I see at the moment how
I could do that.
Signed-off-by: duritong <[EMAIL PROTECTED]>
---
lib/puppet/provider/service/redhat.rb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/puppet/provider/service/redhat.rb
b/lib/puppet/provider/service/redhat.rb
index e2d6ac9..071212d 100755
--- a/lib/puppet/provider/service/redhat.rb
+++ b/lib/puppet/provider/service/redhat.rb
@@ -50,10 +50,10 @@ Puppet::Type.type(:service).provide :redhat, :parent =>
:init do
end
def restart
- if @resource[:hasrestart] == true
+ if @resource[:hasrestart] == :true
service(@resource[:name], "restart")
else
- return false
+ super
end
end
--
1.5.4.3
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---