From 8a2e834bc5a327464b055e582215756c0fbfd698 Mon Sep 17 00:00:00 2001 From: Michael Schuh Date: Thu, 7 Sep 2017 16:05:15 +0200 Subject: [PATCH] Fixed install.sh for Centos7 with lsb_release command available Background: On Centos 7, when command lsb_release available, the dist_version evaluated to 'Core' To be in line with the content of $SUPPORT_MAP, a '7' was needed. The script failed Solution: Added case centos to the case environment on "$lsb_dist" Now the dist_version is evaluated to '7' The script runs as expected Signed-off-by: Michael Schuh --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index 1cf51f2..f8bc0c1 100644 --- a/install.sh +++ b/install.sh @@ -349,6 +349,12 @@ do_install() { esac ;; + centos) + if [ -z "$dist_version" ] && [ -r /etc/os-release ]; then + dist_version="$(. /etc/os-release && echo "$VERSION_ID")" + fi + ;; + *) if command_exists lsb_release; then dist_version="$(lsb_release --codename | cut -f2)"