From a43199f14314b3d966e5723cd336f9747a0f1ca0 Mon Sep 17 00:00:00 2001 From: Avi Miller Date: Fri, 24 Jul 2015 07:38:28 +1000 Subject: [PATCH 1/2] Switch to using only the RPM command to determine the distro version. Signed-off-by: Avi Miller --- hack/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/install.sh b/hack/install.sh index e3820503e..dd9df94a2 100755 --- a/hack/install.sh +++ b/hack/install.sh @@ -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 From 59e48b346848a131d85a808fa1e21aea8c4f9833 Mon Sep 17 00:00:00 2001 From: Avi Miller Date: Fri, 24 Jul 2015 08:14:06 +1000 Subject: [PATCH 2/2] Fix typo. Signed-off-by: Avi Miller --- hack/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/install.sh b/hack/install.sh index dd9df94a2..bbe9f70ed 100755 --- a/hack/install.sh +++ b/hack/install.sh @@ -140,7 +140,7 @@ do_install() { fi if [ -z "$lsb_dist" ] && [ -r /etc/fedora-release ]; then lsb_dist='fedora' - dist_version="$(rpm -q --whatprovides redhat-release --queryformat "%{VERSION\n")" + 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