[chef-dev] Re: CHEF-2398 : adding a cwd attr to the link resource


Chronological Thread 
  • From: Maciej Pasternacki < >
  • To: Laurent Desarmes < >
  • Cc: Joseph Holsten < >,
  • Subject: [chef-dev] Re: CHEF-2398 : adding a cwd attr to the link resource
  • Date: Sun, 15 Apr 2012 13:56:25 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=pasternacki.net; h=subject :mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; q=dns; s= pasternacki.net; b=Zyx1mtBogwFJ4p6swygLJoMNX8DG4xQUXIIaSbDpl5OKG nr92JakAkT0KT4Zdp/RLNsKvJaEUVrbBd3p3sxLLPK4mfqAT4Bk9bZYldK8s4+n9 6N7HoRrkVf0gO1CA7BgDx0Wf4c55Dn8M0dnREWlY0Gxsg1+4Pwn7iEEvHqWa7s=


On Apr 15, 2012, at 13:38 , Laurent Desarmes wrote:

>>>> Could you explain why this is useful? I haven't used them in ages, so I 
>>>> can't
>>>> remember what they're good for (besides surprising me).
>>>> 
>>>> In particular, I have no idea what the example in the ticket is supposed 
>>>> to
>>>> do.
>>> 
>>> Hi
>>> 
>>> the example in the ticket is supposed to maintain a symbolic link in
>>> /boot called "linux" with a relative reference to "linux-3.0.0"
>>> 
>>> 
>>> to make it simple, can you see the difference between:
>>> 1) ln -s /boot/linux-3.0.0 /boot/linux
>>> vs
>>> 2) cd /boot; ln -s linux-3.0.0 linux
>
>> You don't need to chdir(), 1) is equivalent to in -s linux-3.0.0 
>> /boot/linux
> 
> 2) you meant.

You're right.

On Linux (and probably other Unices) it works with Chef as well - I've got 
this in my cookbooks:

# ree doesn't leave a versioned binary, which makes rake use system one.
link "/usr/local/bin/ruby1.8" do
  to "ruby"
end

-- M


Archive powered by MHonArc 2.6.16.

§