1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Switch to using only the RPM command to determine the distro version.

Signed-off-by: Avi Miller <avi.miller@oracle.com>
This commit is contained in:
Avi Miller 2015-07-24 07:38:28 +10:00
parent c6f4c192fe
commit a43199f143

View file

@ -140,12 +140,12 @@ do_install() {
fi
if [ -z "$lsb_dist" ] && [ -r /etc/fedora-release ]; then
lsb_dist='fedora'
dist_version="$(rpm -qa \*-release | cut -d"-" -f3 | head -n1)"
dist_version="$(rpm -q --whatprovides redhat-release --queryformat "%{VERSION\n")"
fi
if [ -z "$lsb_dist" ]; then
if [ -r /etc/centos-release ] || [ -r /etc/redhat-release ]; then
lsb_dist='centos'
dist_version="$(rpm -qa \*-release | cut -d"-" -f3 | head -n1)"
dist_version="$(rpm -q --whatprovides redhat-release --queryformat "%{VERSION}\n")"
fi
fi
if [ -z "$lsb_dist" ] && [ -r /etc/os-release ]; then