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 <michael.schuh@desy.de>
This commit is contained in:
Michael Schuh committed 2017-09-07 16:15:30 +02:00
1 parent 6a2b5fdc6e
commit 8a2e834bc5
1 file changed
+6
+6
View File
@@ -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)"