diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-21 17:22:26 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-21 17:22:26 +0000 |
| commit | 5faa45d328e183c84754692b2a3837a09a190437 (patch) | |
| tree | ab38bbd1caad45899d29caa93e9d243f812c4a9d /lib | |
| parent | 62abbd5d3f4d7f9ec0f1781ee8247c8942a34a0f (diff) | |
| download | puppet-5faa45d328e183c84754692b2a3837a09a190437.tar.gz puppet-5faa45d328e183c84754692b2a3837a09a190437.tar.xz puppet-5faa45d328e183c84754692b2a3837a09a190437.zip | |
Fixing #274. I just set :ensure to be :link when :target is set.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1644 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/type/pfile/target.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/puppet/type/pfile/target.rb b/lib/puppet/type/pfile/target.rb index 4a725d652..23fb30390 100644 --- a/lib/puppet/type/pfile/target.rb +++ b/lib/puppet/type/pfile/target.rb @@ -12,6 +12,12 @@ module Puppet # Anything else, basically newvalue(/./) do + if ! @parent.should(:ensure) + @parent[:ensure] = :link + elsif @parent.should(:ensure) != :link + raise Puppet::Error, + "You cannot specify a target unless 'ensure' is set to 'link'" + end if @parent.state(:ensure).insync? mklink() end |
