Skip to content

Commit

Permalink
update raspbian detect to also check in os_release
Browse files Browse the repository at this point in the history
Signed-off-by: Jared Quick <jquick@chef.io>
  • Loading branch information
jquick committed Nov 1, 2017
1 parent 98c10dd commit 64a0ccd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/train/platforms/detect/specifications/os.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def self.load
}
plat.name('raspbian').title('Raspbian Linux').in_family('debian')
.detect {
if unix_file_exist?('/usr/bin/raspi-config')
if (linux_os_release && linux_os_release['NAME'] =~ /raspbian/i) || \
unix_file_exist?('/usr/bin/raspi-config')
@platform[:release] = unix_file_contents('/etc/debian_version').chomp
true
end
Expand Down

0 comments on commit 64a0ccd

Please sign in to comment.