use driverDir not groupDir

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2016-02-18 11:19:52 +00:00
parent 365d2744d6
commit d054f4392d
2 changed files with 5 additions and 5 deletions

View File

@ -10,9 +10,9 @@ pidfile="/run/docker.pid"
# future change this to use a hypervisor socket.
DOCKER_OPTS="${DOCKER_OPTS} -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"
if cat /proc/cmdline | grep -q 'com.docker.groupDir'
if cat /proc/cmdline | grep -q 'com.docker.driverDir'
then
DRIVER="$(cat /proc/cmdline | sed -e 's/.*com.docker.groupDir="//' -e 's/".*//')"
DRIVER="$(cat /proc/cmdline | sed -e 's/.*com.docker.driverDir="//' -e 's/".*//')"
INET=$(ifconfig eth0 2> /dev/null | grep 'inet addr' | cut -f 2 -d ":" | cut -f 1 -d " ")
[ -d "/Mac/$DRIVER" ] && echo $INET > "/Mac/$DRIVER/ip"
fi

View File

@ -8,13 +8,13 @@ depends()
start()
{
cat /proc/cmdline | grep -q 'com.docker.groupDir' || exit 0
cat /proc/cmdline | grep -q 'com.docker.driverDir' || exit 0
ebegin "Redirecting logs to host"
GROUPDIR="/Mac$(cat /proc/cmdline | sed -e 's/.*com.docker.groupDir="//' -e 's/".*//')"
DRIVERDIR="/Mac$(cat /proc/cmdline | sed -e 's/.*com.docker.driverDir="//' -e 's/".*//')"
mount --bind "${GROUPDIR}/log" /var/log
mount --bind "${DRIVERDIR}/log" /var/log
eend $? "Failed to redirect logs to host"
}