summaryrefslogtreecommitdiffstats
path: root/lib/facter/gluster_property.rb
diff options
context:
space:
mode:
authorJames Shubin <james@shubin.ca>2014-03-11 17:33:11 -0400
committerJames Shubin <james@shubin.ca>2014-03-16 22:39:07 -0400
commit0f11f74eb0d0ba2725486d922841157b94fa06b3 (patch)
tree7654ef682076509e5bf8b2c322bc5465a3dbc432 /lib/facter/gluster_property.rb
parent70b41db233f28fcb39011b0bd694ba5211ef4989 (diff)
downloadpuppet-gluster-0f11f74eb0d0ba2725486d922841157b94fa06b3.tar.gz
puppet-gluster-0f11f74eb0d0ba2725486d922841157b94fa06b3.tar.xz
puppet-gluster-0f11f74eb0d0ba2725486d922841157b94fa06b3.zip
Fix small bugs for setgroups.
Diffstat (limited to 'lib/facter/gluster_property.rb')
-rw-r--r--lib/facter/gluster_property.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/facter/gluster_property.rb b/lib/facter/gluster_property.rb
index 17a889d..d38614e 100644
--- a/lib/facter/gluster_property.rb
+++ b/lib/facter/gluster_property.rb
@@ -46,7 +46,7 @@ found = {}
[valid_setgroupdir, groupdir].each do |g|
if not(g.nil?) and File.directory?(g)
- Dir.glob(g+'*.*').each do |f|
+ Dir.glob(g+'*').each do |f|
b = File.basename(f)
# a later entry overrides an earlier one...
@@ -56,7 +56,7 @@ found = {}
groups = File.open(f, 'r').read # read into str
groups.each_line do |line|
- split = line.split('=') # split key=value pairs
+ split = line.strip.split('=') # split key=value pairs
if split.length == 2
key = split[0]
value = split[1]