Fix the check of docker installation

In before, we checked docker installation by:

  $ rpm -q docker-engine

However, this doesn't work for all cases in fedora 24.
* If docker was installed by "sudo dnf install docker-engine", the
  package will be named as "docker". Therefore, it should be checked
  by "rpm -q docker".
* If docker was installed by devstack (by using
  https://get.docker.com/), the package will be named as
  "docker-engine". Therefore, it should be checked by
  "rpm -q docker-engine".

This commit added check for "docker" as well.

Closes-Bug: #1647459
Change-Id: If89d8b62ffa542f0491f43d42a119741882eb3cd
This commit is contained in:
Hongbin Lu 2016-12-05 13:58:04 -06:00
parent 56d288f508
commit 0e5b420584
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ function check_docker {
if is_ubuntu; then
dpkg -s docker-engine > /dev/null 2>&1
else
rpm -q docker-engine > /dev/null 2>&1
rpm -q docker-engine > /dev/null 2>&1 || rpm -q docker > /dev/null 2>&1
fi
}