diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/reports/tagmail.rb | 4 | ||||
-rwxr-xr-x | lib/puppet/server/fileserver.rb | 17 | ||||
-rw-r--r-- | lib/puppet/server/master.rb | 2 |
3 files changed, 14 insertions, 9 deletions
diff --git a/lib/puppet/reports/tagmail.rb b/lib/puppet/reports/tagmail.rb index e842b17ac..2a00ea4c1 100644 --- a/lib/puppet/reports/tagmail.rb +++ b/lib/puppet/reports/tagmail.rb @@ -87,7 +87,7 @@ Puppet::Server::Report.newreport(:tagmail) do # Let's fork for the sending of the email, since you never know what might # happen. - fork do + pid = fork do if Puppet[:smtpserver] != "none" begin Net::SMTP.start(Puppet[:smtpserver]) do |smtp| @@ -128,6 +128,8 @@ Puppet::Server::Report.newreport(:tagmail) do raise Puppet::Error, "SMTP server is unset and could not find sendmail" end end + + Process.detach(pid) end end diff --git a/lib/puppet/server/fileserver.rb b/lib/puppet/server/fileserver.rb index 85f0f5016..8033fac5b 100755 --- a/lib/puppet/server/fileserver.rb +++ b/lib/puppet/server/fileserver.rb @@ -245,7 +245,7 @@ class Server name = $1 if newmounts.include?(name) raise FileServerError, "%s is already mounted at %s" % - [newmounts[name], name] + [newmounts[name], name], count, @config.file end mount = Mount.new(name) newmounts[name] = mount @@ -267,8 +267,8 @@ class Server mount.info "allowing %s access" % val mount.allow(val) rescue AuthStoreError => detail - raise FileServerError, "%s at line %s of %s" % - [detail.to_s, count, @config] + raise FileServerError.new(detail.to_s, + count, @config.file) end } when "deny": @@ -277,16 +277,17 @@ class Server mount.info "denying %s access" % val mount.deny(val) rescue AuthStoreError => detail - raise FileServerError, "%s at line %s of %s" % - [detail.to_s, count, @config] + raise FileServerError.new(detail.to_s, + count, @config.file) end } else - raise FileServerError, - "Invalid argument '%s' at line %s" % [var, count] + raise FileServerError.new("Invalid argument '%s'" % var, + count, @config.file) end else - raise FileServerError, "Invalid line %s: %s" % [count, line] + raise FileServerError.new("Invalid line '%s'" % line.chomp, + count, @config.file) end count += 1 } diff --git a/lib/puppet/server/master.rb b/lib/puppet/server/master.rb index 1822e779e..79fe53da0 100644 --- a/lib/puppet/server/master.rb +++ b/lib/puppet/server/master.rb @@ -202,3 +202,5 @@ class Server end end end + +# $Id$ |