Make conditionals more consistent

Other OpenStack projects use the existence of apt-get/yum to determine
platform, and not redhat-release/lsb-release. This change corrects that
discrepancy.

Change-Id: I8d9013a3bbad9254b2158ec7f0f89cc98b8b7e2f
This commit is contained in:
Samuel Cassiba
2016-04-09 09:38:08 -07:00
parent 745f01e2cf
commit c8a9c6604f

View File

@@ -82,9 +82,9 @@ def _run_commands(desc, commands, openstack=true)
end
# use the correct environment depending on platform
if File.exist?('/etc/lsb-release')
if File.exist?('/usr/bin/apt-get')
@platform = 'ubuntu14'
elsif File.exist?('/etc/redhat-release')
elsif File.exist?('/usr/bin/yum')
@platform = 'centos7'
end