hughesjr / rpms / docker

Forked from rpms/docker 4 years ago
Clone

Blame SOURCES/docker-common.sh

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