Browse code

Fix installation script for RHEL

the previous fix changed the lsb_dist variable
too early. We only normalize to "centos"
for the repository-location, so changing
it just before that.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2016/06/23 03:21:19
Showing 1 changed files
... ...
@@ -243,8 +243,7 @@ do_install() {
243 243
 		lsb_dist='centos'
244 244
 	fi
245 245
 	if [ -z "$lsb_dist" ] && [ -r /etc/redhat-release ]; then
246
-		# we use centos for both redhat and centos releases
247
-		lsb_dist='centos'
246
+		lsb_dist='redhat'
248 247
 	fi
249 248
 	if [ -z "$lsb_dist" ] && [ -r /etc/os-release ]; then
250 249
 		lsb_dist="$(. /etc/os-release && echo "$ID")"
... ...
@@ -438,6 +437,10 @@ do_install() {
438 438
 			;;
439 439
 
440 440
 		fedora|centos|redhat|oraclelinux)
441
+			if [ "${lsb_dist}" = "redhat" ]; then
442
+				# we use the centos repository for both redhat and centos releases
443
+				lsb_dist='centos'
444
+			fi
441 445
 			$sh_c "cat >/etc/yum.repos.d/docker-${repo}.repo" <<-EOF
442 446
 			[docker-${repo}-repo]
443 447
 			name=Docker ${repo} Repository