From: Stephen Gran Date: Wed, 22 Apr 2009 23:52:36 +0000 (+0100) Subject: I suspect that while the inline read was shorter, it was leaking fds X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=5c692b20a2ade6b69da487ecf802249de548f7fa;p=mirror%2Fdsa-puppet.git I suspect that while the inline read was shorter, it was leaking fds Signed-off-by: Stephen Gran --- diff --git a/templates/motd.erb b/templates/motd.erb index 1881c41b3..a0a7a7255 100644 --- a/templates/motd.erb +++ b/templates/motd.erb @@ -3,6 +3,8 @@ is monitored and will be used as evidence for prosecutions. <% if File.exists?("/etc/puppet/modules/motd/files/" + fqdn + "/motd.tail") -%> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<%= File.open("/etc/puppet/modules/motd/files/" + fqdn + "/motd.tail").read -%> +<% f = File.open("/etc/puppet/modules/motd/files/" + fqdn + "/motd.tail") -%> +<%= f.read -%> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +<% f.close -%> <% end -%>