summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-09-05 22:35:53 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-09-05 22:35:53 +0000
commitfa16a92ff96d37d6b0d443536218d9d46d56eadd (patch)
treed40ecfa1e23c9a258e837a628f0d542c4637af86 /lib/puppet
parente28250dc1d30cf9e9c13e157143e140b402c967e (diff)
downloadpuppet-fa16a92ff96d37d6b0d443536218d9d46d56eadd.tar.gz
puppet-fa16a92ff96d37d6b0d443536218d9d46d56eadd.tar.xz
puppet-fa16a92ff96d37d6b0d443536218d9d46d56eadd.zip
Fixing small bug in cron where removed fields are not deleted from the file
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1565 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rwxr-xr-xlib/puppet/filetype.rb6
-rwxr-xr-xlib/puppet/type/cron.rb3
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/puppet/filetype.rb b/lib/puppet/filetype.rb
index a5dc6a115..03bf70838 100755
--- a/lib/puppet/filetype.rb
+++ b/lib/puppet/filetype.rb
@@ -153,7 +153,11 @@ module Puppet
# Remove a specific @path's cron tab.
def remove
- %x{#{cmdbase()} -r 2>/dev/null}
+ if Facter.value("operatingsystem") == "FreeBSD"
+ %x{/bin/echo yes | #{cmdbase()} -r 2>/dev/null}
+ else
+ %x{#{cmdbase()} -r 2>/dev/null}
+ end
end
# Overwrite a specific @path's cron tab; must be passed the @path name
diff --git a/lib/puppet/type/cron.rb b/lib/puppet/type/cron.rb
index 03ac24d29..cabe52a40 100755
--- a/lib/puppet/type/cron.rb
+++ b/lib/puppet/type/cron.rb
@@ -782,7 +782,8 @@ module Puppet
if @states.include?(name)
ret = @states[name].should_to_s
- if ret == :absent or ret.nil?
+ #if ret == :absent or ret.nil?
+ if ret.nil?
ret = @states[name].is_to_s
end