summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rwxr-xr-xlib/puppet/server/fileserver.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/puppet/server/fileserver.rb b/lib/puppet/server/fileserver.rb
index 6eec3503d..aa513d68c 100755
--- a/lib/puppet/server/fileserver.rb
+++ b/lib/puppet/server/fileserver.rb
@@ -189,6 +189,12 @@ class Server
when /^\s*$/: next # skip blank lines
when /\[(\w+)\]/:
name = $1
+ if mount
+ unless mount.path
+ raise Puppet::Error, "Mount %s has no path specified" %
+ mount.name
+ end
+ end
if @mounts.include?(name)
raise FileServerError, "%s is already mounted at %s" %
[@mounts[name], name]
@@ -330,6 +336,10 @@ class Server
unless @mounts.include?(mount)
raise FileServerError, "%s not mounted" % mount
end
+
+ unless @mounts[mount].path
+ raise FileServerError, "Mount %s does not have a path set" % mount
+ end
else
raise FileServerError, "Invalid path '%s'" % dir
end