hughesjr / rpms / docker

Forked from rpms/docker 4 years ago
Clone

Blame SOURCES/dockerd-common.sh

478cdc
#!/bin/sh
478cdc
. /etc/sysconfig/docker
478cdc
[ -e "${DOCKERDBINARY}" ] || DOCKERDBINARY=/usr/bin/dockerd-current
478cdc
if [ ! -f /usr/bin/dockerd-current ]; then
478cdc
    if [ ! -f /usr/bin/dockerd-latest ]; then
478cdc
        echo "You don't have either docker or \
478cdc
docker-latest installed. Please install either one and retry."
478cdc
        exit
478cdc
    else
478cdc
        DOCKERDBINARY=/usr/bin/dockerd-latest
478cdc
    fi
478cdc
fi
478cdc
if [[ ${DOCKERDBINARY} != "/usr/bin/dockerd-current" && ${DOCKERDBINARY} != "/usr/bin/dockerd-latest" ]]; then
478cdc
    echo "DOCKERDBINARY has been set to an invalid value:" $DOCKERDBINARY
478cdc
    echo ""
478cdc
    echo "Please set DOCKERDBINARY to /usr/bin/dockerd-current or /usr/bin/dockerd-latest
478cdc
by editing /etc/sysconfig/docker"
478cdc
else
478cdc
    exec ${DOCKERDBINARY} "$@"
478cdc
fi