Merge pull request #8643 from jfrazelle/fix-amazon-linux-dist

Fix amazon linux dist
This commit is contained in:
Tianon Gravi 2014-10-24 19:26:27 -06:00
commit 10d3315080

View file

@ -70,18 +70,29 @@ if [ -z "$lsb_dist" ] && [ -r /etc/lsb-release ]; then
lsb_dist="$(. /etc/lsb-release && echo "$DISTRIB_ID")"
fi
if [ -z "$lsb_dist" ] && [ -r /etc/debian_version ]; then
lsb_dist='Debian'
lsb_dist='debian'
fi
if [ -z "$lsb_dist" ] && [ -r /etc/fedora-release ]; then
lsb_dist='Fedora'
lsb_dist='fedora'
fi
if [ -z "$lsb_dist" ] && [ -r /etc/os-release ]; then
lsb_dist="$(. /etc/os-release && echo "$ID")"
fi
lsb_dist="$(echo "$lsb_dist" | tr '[:upper:]' '[:lower:]')"
case "$lsb_dist" in
Fedora)
(
set -x
$sh_c 'sleep 3; yum -y -q install docker-io'
)
amzn|fedora)
if [ "$lsb_dist" = 'amzn' ]; then
(
set -x
$sh_c 'sleep 3; yum -y -q install docker'
)
else
(
set -x
$sh_c 'sleep 3; yum -y -q install docker-io'
)
fi
if command_exists docker && [ -e /var/run/docker.sock ]; then
(
set -x
@ -101,7 +112,7 @@ case "$lsb_dist" in
exit 0
;;
Ubuntu|Debian|LinuxMint)
ubuntu|debian|linuxmint)
export DEBIAN_FRONTEND=noninteractive
did_apt_get_update=
@ -178,7 +189,7 @@ case "$lsb_dist" in
exit 0
;;
Gentoo)
gentoo)
if [ "$url" = "https://test.docker.com/" ]; then
echo >&2
echo >&2 ' You appear to be trying to install the latest nightly build in Gentoo.'