[chef] Re: Re: Re: Re: Service Resource broken on OSX as of 11.12


Chronological Thread 
  • From: Brian Hatfield < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Service Resource broken on OSX as of 11.12
  • Date: Wed, 16 Apr 2014 14:26:46 -0400

I just traced that out, and it looks correct to me!

Thank you!


On Wed, Apr 16, 2014 at 2:23 PM, Daniel DeLeo < " target="_blank"> > wrote:


On Wednesday, April 16, 2014 at 11:12 AM, Brian Hatfield wrote:

> Hi Daniel,
>
> Thanks for your response!
>
> I can add this to the ticket if you'd like, but the resource attempts to glob a resource here:
>
> https://github.com/opscode/chef/blob/master/lib/chef/provider/service/macosx.rb#L192-L195
>
> using a list of locations defined here:
>
> https://github.com/opscode/chef/blob/master/lib/chef/provider/service/macosx.rb#L28-L38
>
> It seems plausible that one might run a service with a plist located elsewhere on the filesystem than what's in this list (we're not doing that under Chef, but I've seen it done).
>
> Brian
Okay, thanks for explaining. It looks to me like we only need to find the service label from the plist to enable or disable a service, so we can probably make the provider tolerate a missing plist file for the other actions. I’d add a return statement here: https://github.com/opscode/chef/blob/master/lib/chef/provider/service/macosx.rb#L175 (e.g., `return false if @plist.nil?`) and change this https://github.com/opscode/chef/blob/master/lib/chef/provider/service/macosx.rb#L62 to only require a service label for :enable and :disable.

I think something like that should at least fix everything that was working previously, yes?


--
Daniel DeLeo





Archive powered by MHonArc 2.6.16.

§