summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
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