On 15/09/09 20:00, Luke Kanies wrote:
> +1, although tests would be good.

The patch is not completely correct. I'll fix this and make sure tests 
are passing. The last patch for runit/daemontools that was accepted in 
fact broke runit, but I didn't notice at that time.

> On Sep 15, 2009, at 5:05 AM, James Turnbull wrote:
> 
>>
>> Signed-off-by: James Turnbull <[email protected]>
>> ---
>> lib/puppet/provider/service/daemontools.rb |    9 ++-------
>> 1 files changed, 2 insertions(+), 7 deletions(-)
>>
>> diff --git a/lib/puppet/provider/service/daemontools.rb b/lib/puppet/ 
>> provider/service/daemontools.rb
>> index f6eb509..e1c485a 100644
>> --- a/lib/puppet/provider/service/daemontools.rb
>> +++ b/lib/puppet/provider/service/daemontools.rb
>> @@ -125,7 +125,7 @@  
>> Puppet::Type.type(:service).provide :daemontools, :parent => :base do
>>     end
>>
>>     def startcmd
>> -        self.enable if ! FileTest.symlink?(self.service)
>> +        enable unless enabled?
>>         [command(:svc), "-u", self.service ]
>>     end
>>
>> @@ -143,12 +143,7 @@  
>> Puppet::Type.type(:service).provide :daemontools, :parent => :base do
>>     end
>>
>>     def enabled?
>> -        case self.status
>> -        when :running:
>> -            return :true
>> -        else
>> -            return :false
>> -        end
>> +        return FileTest.symlink?(self.service) ? :true : :false
>>     end
>>
>>     def enable
>> -- 
>> 1.6.0.6
>>
>>
> 
> 


-- 
Brice Figureau
My Blog: http://www.masterzen.fr/


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