Issue Details (XML | Word | Printable)

Key: CHEF-722
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: AJ Christensen
Reporter: Jim Tink
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Chef

Link provider doesn't understand paths requiring expansion

Created: 19/Nov/09 10:10 PM   Updated: 05/Jan/10 12:48 AM   Resolved: 04/Jan/10 06:08 AM
Component/s: Providers
Affects Version/s: 0.7.14
Fix Version/s: 0.8.2

Environment:

Debian 5.0.1



 Description  « Hide

The Link resource creates a new symlink everytime chef-client is run. This is fine until I need to notify a service to restart when the link is created.

I can add a not_if to only run if the symlink exists however this doesn't account for when the destination for the symlink is different.

I have this work around:

link "/etc/pure-ftpd/auth/65unix" do
to "../conf/UnixAuthentication"
notifies :restart, resources(:service => "pure-ftpd")

  1. If the symlink exists and it points to the "TO" file then don't do anything
    not_if do File.symlink?("#{name}") and File.readlink("#{name}") == to end
    end


Sort Order: Ascending order - Click to sort in descending order
Adam Jacob added a comment - 23/Nov/09 07:04 PM

Scheduling this fix for 0.8


AJ Christensen added a comment - 04/Jan/10 06:08 AM

Triage


AJ Christensen added a comment - 04/Jan/10 06:08 AM

Fixed, pushed fujin/chef-722


Adam Jacob added a comment - 05/Jan/10 12:48 AM

Fixed!