summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-04-30 15:57:57 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-04-30 15:57:57 +0000
commit7e971436c9967c5bfe95a418911db41f4e937696 (patch)
treed07e957f4f33672242cfe272b42ead5b4a055bcc /lib
parent4dbcc5d2dafde3e4388937ab9b81174e2758bbe7 (diff)
downloadpuppet-7e971436c9967c5bfe95a418911db41f4e937696.tar.gz
puppet-7e971436c9967c5bfe95a418911db41f4e937696.tar.xz
puppet-7e971436c9967c5bfe95a418911db41f4e937696.zip
Allowing "-" in fileserver module names, #617
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2434 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rwxr-xr-xlib/puppet/network/handler/fileserver.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/network/handler/fileserver.rb b/lib/puppet/network/handler/fileserver.rb
index 1dd6ad793..0170eae7b 100755
--- a/lib/puppet/network/handler/fileserver.rb
+++ b/lib/puppet/network/handler/fileserver.rb
@@ -253,7 +253,7 @@ class Puppet::Network::Handler
case line
when /^\s*#/: next # skip comments
when /^\s*$/: next # skip blank lines
- when /\[(\w+)\]/:
+ when /\[([-\w]+)\]/:
name = $1
if newmounts.include?(name)
raise FileServerError, "%s is already mounted at %s" %
@@ -384,7 +384,7 @@ class Puppet::Network::Handler
# so first retrieve the mount path
mount = nil
path = nil
- if dir =~ %r{/(\w+)/?}
+ if dir =~ %r{/([-\w]+)/?}
tmp = $1
path = dir.sub(%r{/#{tmp}/?}, '')
@@ -490,7 +490,7 @@ class Puppet::Network::Handler
# Create out object. It must have a name.
def initialize(name, path = nil)
- unless name =~ %r{^\w+$}
+ unless name =~ %r{^[-\w]+$}
raise FileServerError, "Invalid name format '%s'" % name
end
@name = name