summaryrefslogtreecommitdiff
path: root/automated/linux
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2016-11-30 16:55:05 +0800
committerChase Qi <chase.qi@linaro.org>2016-11-30 16:55:05 +0800
commit39edfc5d4bdd944bcb36f3d837d1dc5e398c7cee (patch)
treef8240755ac0bbbb944cc2b7fb068e71e30b910e7 /automated/linux
parenta76e8dd06dc4df3c397928f8b3e55c3be8e85d93 (diff)
automated: linux: docker: fix package installation on CentOS
On CentOS/Fedora, the package name is 'docker'. Change-Id: I1d2cfc8bd74df8481583a50f8d1b1804b9267b7b Signed-off-by: Chase Qi <chase.qi@linaro.org>
Diffstat (limited to 'automated/linux')
-rwxr-xr-xautomated/linux/docker/docker.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/automated/linux/docker/docker.sh b/automated/linux/docker/docker.sh
index d4ea4c2..eb23e56 100755
--- a/automated/linux/docker/docker.sh
+++ b/automated/linux/docker/docker.sh
@@ -1,5 +1,6 @@
#!/bin/sh
+# shellcheck disable=SC1091
. ../../lib/sh-test-lib
OUTPUT="$(pwd)/output"
RESULT_FILE="${OUTPUT}/result.txt"
@@ -22,9 +23,17 @@ done
[ -d "${OUTPUT}" ] && mv "${OUTPUT}" "${OUTPUT}_$(date +%Y%m%d%H%M%S)"
mkdir -p "${OUTPUT}"
+dist_name
+# shellcheck disable=SC2154
+case "${dist}" in
+ Debian|Ubuntu) pkgs="docker-engine" ;;
+ Fedora|CentOS) pkgs="docker" ;;
+ *) error_msg "Unsupported distribution" ;;
+esac
+
skip_list="start-docker-service run-docker-image"
-install_deps "docker-engine"
-exit_on_fail "install-docker-engine" "${skip_list}"
+install_deps "${pkgs}"
+exit_on_fail "install-docker" "${skip_list}"
skip_list="run-docker-image"
systemctl start docker