diff options
author | James Shubin <james@shubin.ca> | 2014-03-11 17:33:11 -0400 |
---|---|---|
committer | James Shubin <james@shubin.ca> | 2014-03-16 22:39:07 -0400 |
commit | 0f11f74eb0d0ba2725486d922841157b94fa06b3 (patch) | |
tree | 7654ef682076509e5bf8b2c322bc5465a3dbc432 /lib/facter/gluster_property.rb | |
parent | 70b41db233f28fcb39011b0bd694ba5211ef4989 (diff) | |
download | puppet-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.rb | 4 |
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] |