I'd like, at the least, confirmation that this fixes all three issues  
(#2481, #2525, and #2552), and if at all possible, I'd love to see  
some tests for this.

Markus, maybe you could knock out some tests to verify that the right  
command is called when 'status' et al commands are provided, when the  
'hasstatus' et al are provided, and when none are?

On Aug 23, 2009, at 7:02 PM, James Turnbull wrote:

>
>
> Signed-off-by: James Turnbull <[email protected]>
> ---
> lib/puppet/provider/service/redhat.rb |   31 +++++++ 
> +-----------------------
> 1 files changed, 8 insertions(+), 23 deletions(-)
>
> diff --git a/lib/puppet/provider/service/redhat.rb b/lib/puppet/ 
> provider/service/redhat.rb
> index 5eceede..5e4eb01 100755
> --- a/lib/puppet/provider/service/redhat.rb
> +++ b/lib/puppet/provider/service/redhat.rb
> @@ -52,29 +52,6 @@  
> Puppet::Type.type(:service).provide :redhat, :parent => :init do
>         end
>     end
>
> -    def restart
> -        if @resource[:hasrestart] == :true
> -            [command(:service), @resource[:name], "restart"]
> -        else
> -            super
> -        end
> -    end
> -
> -    def status
> -        if @resource[:status]
> -            super
> -        elsif @resource[:hasstatus] == :true
> -            begin
> -                service(@resource[:name], "status")
> -                return :running
> -            rescue
> -                return :stopped
> -            end
> -        else
> -            super
> -        end
> -    end
> -
>     def startcmd
>         [command(:service), @resource[:name], "start"]
>     end
> @@ -83,5 +60,13 @@  
> Puppet::Type.type(:service).provide :redhat, :parent => :init do
>         [command(:service), @resource[:name], "stop"]
>     end
>
> +    def restartcmd
> +        [command(:service), @resource[:name], "restart"]
> +    end
> +
> +    def statuscmd
> +        [command(:service), @resource[:name], "status"]
> +    end
> +
> end
>
> -- 
> 1.6.0.6
>
>
> >


-- 
There are three kinds of death in this world. There's heart death,
there's brain death, and there's being off the network. -- Guy Almes
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to