Skip to content

Commit

Permalink
simplificacio
Browse files Browse the repository at this point in the history
  • Loading branch information
jordiprats committed Mar 30, 2020
1 parent 1e0487c commit 19a48ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/facter/eypconf_generic_id.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Dir.entries("/etc/eypconf/id").select {|f| !File.directory? f}.each do |i|

genetic_id = Facter::Util::Resolution.exec("bash -c 'cat /etc/eypconf/id/#{i}'").to_s

if i[0]=='.'
fact_name=i[1..-1]
genetic_id = Facter::Util::Resolution.exec("bash -c 'cat /etc/eypconf/id/#{fact_name}'").to_s
else
fact_name=i
genetic_id = Facter::Util::Resolution.exec("bash -c 'cat /etc/eypconf/id/#{fact_name}'").to_s
end

unless genetic_id.nil? or genetic_id.empty?
Expand Down

0 comments on commit 19a48ec

Please sign in to comment.