summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlib/puppet/type/pfile/source.rb13
-rwxr-xr-xlib/puppet/type/schedule.rb14
2 files changed, 26 insertions, 1 deletions
diff --git a/lib/puppet/type/pfile/source.rb b/lib/puppet/type/pfile/source.rb
index 2bdce9240..c0bfab310 100755
--- a/lib/puppet/type/pfile/source.rb
+++ b/lib/puppet/type/pfile/source.rb
@@ -25,6 +25,19 @@ module Puppet
See the [fileserver docs][] for information on how to configure
and use file services within Puppet.
+ If you specify multiple file sources for a file, then the first
+ source that exists will be used. This allows you to specify
+ what amount to search paths for files:
+
+ file { \"/path/to/my/file\":
+ source => [
+ \"/nfs/files/file.$host\",
+ \"/nfs/files/file.$operatingsystem\",
+ \"/nfs/files/file\"
+ ]
+ }
+
+ This will use the first found file as the source.
[fileserver docs]: fsconfigref.html
diff --git a/lib/puppet/type/schedule.rb b/lib/puppet/type/schedule.rb
index 0fd6a533a..8c89ab906 100755
--- a/lib/puppet/type/schedule.rb
+++ b/lib/puppet/type/schedule.rb
@@ -104,6 +104,18 @@ module Puppet
self.fail "Invalid range %s" % value
end
+ # Make sure the hours are valid
+ [range[0][0], range[1][0]].each do |n|
+ if n < 0 or n > 23
+ raise ArgumentError, "Invalid hour '%s'" % n
+ end
+ end
+
+ [range[0][1], range[1][1]].each do |n|
+ if n and (n < 0 or n > 59)
+ raise ArgumentError, "Invalid minute '%s'" % n
+ end
+ end
if range[0][0] > range[1][0]
self.fail(("Invalid range %s; " % value) +
"ranges cannot span days."
@@ -261,7 +273,7 @@ module Puppet
newparam(:repeat) do
desc "How often the application gets repeated in a given period.
- Defaults to 1."
+ Defaults to 1. Must be an integer."
defaultto 1