summaryrefslogtreecommitdiffstats
path: root/puppet-0.25.5-puppet.conf-line-endings.patch
blob: 570f2e1da637c647320ae0c0a39f3febdd0c3823 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 1e89bff59448bfc22c22f0b03bf965b7f4da0c77 Mon Sep 17 00:00:00 2001
From: James Turnbull <james@lovedthanlost.net>
Date: Wed, 16 Jun 2010 03:22:17 +1000
Subject: [PATCH/puppet] Fixes #3514 - CR/LF line ending in puppet.conf cause silent failure

Patch thanks to Alan Barrett
---
 lib/puppet/util/settings.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb
index 11d760f..2dedc31 100644
--- a/lib/puppet/util/settings.rb
+++ b/lib/puppet/util/settings.rb
@@ -894,13 +894,13 @@ Generated on #{Time.now}.
         text.split(/\n/).each { |line|
             count += 1
             case line
-            when /^\s*\[(\w+)\]$/
+            when /^\s*\[(\w+)\]\s*$/
                 section = $1.intern # Section names
                 # Add a meta section
                 result[section][:_meta] ||= {}
             when /^\s*#/; next # Skip comments
             when /^\s*$/; next # Skip blanks
-            when /^\s*(\w+)\s*=\s*(.*)$/ # settings
+            when /^\s*(\w+)\s*=\s*(.*?)\s*$/ # settings
                 var = $1.intern
 
                 # We don't want to munge modes, because they're specified in octal, so we'll
-- 
1.7.2.1