balena-supervisor/entry.sh

23 lines
476 B
Bash
Raw Normal View History

#!/bin/sh
2014-06-10 00:05:16 +00:00
set -o errexit
[ -d /dev/net ] ||
mkdir -p /dev/net
[ -c /dev/net/tun ] ||
mknod /dev/net/tun c 10 200
2015-08-06 16:05:47 +00:00
mount -t tmpfs -o size=1m tmpfs /var/run/resin
2015-01-02 17:34:42 +00:00
# If DOCKER_ROOT isn't set then default it
if [ -z "${DOCKER_ROOT}" ]; then
DOCKER_ROOT=/mnt/root/var/lib/rce
fi
# Mount the DOCKER_ROOT path equivalent in the container fs
DOCKER_LIB_PATH=${DOCKER_ROOT#/mnt/root}
if [ ! -d "${DOCKER_LIB_PATH}" ]; then
ln -s "${DOCKER_ROOT}" "${DOCKER_LIB_PATH}"
fi