2014-04-27 21:46:59 +00:00
|
|
|
#!/bin/sh
|
2014-06-10 00:05:16 +00:00
|
|
|
|
2016-07-06 08:45:32 +00:00
|
|
|
set -o errexit
|
2014-04-27 21:46:59 +00:00
|
|
|
|
|
|
|
[ -d /dev/net ] ||
|
|
|
|
mkdir -p /dev/net
|
|
|
|
[ -c /dev/net/tun ] ||
|
|
|
|
mknod /dev/net/tun c 10 200
|
2017-03-07 16:09:06 +00:00
|
|
|
[ -d /mnt/root/tmp/resin-supervisor ] ||
|
|
|
|
mkdir -p /mnt/root/tmp/resin-supervisor
|
2014-04-27 21:46:59 +00:00
|
|
|
|
2017-08-18 20:43:47 +00:00
|
|
|
mkdir -p /var/run/resin
|
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
|
|
|
|
2016-06-23 18:07:18 +00:00
|
|
|
# If DOCKER_ROOT isn't set then default it
|
|
|
|
if [ -z "${DOCKER_ROOT}" ]; then
|
|
|
|
DOCKER_ROOT=/mnt/root/var/lib/rce
|
|
|
|
fi
|
2016-07-06 08:45:32 +00:00
|
|
|
|
2016-06-23 18:07:18 +00:00
|
|
|
# Mount the DOCKER_ROOT path equivalent in the container fs
|
|
|
|
DOCKER_LIB_PATH=${DOCKER_ROOT#/mnt/root}
|
2016-07-06 08:45:32 +00:00
|
|
|
|
2016-06-23 18:07:18 +00:00
|
|
|
if [ ! -d "${DOCKER_LIB_PATH}" ]; then
|
|
|
|
ln -s "${DOCKER_ROOT}" "${DOCKER_LIB_PATH}"
|
2016-06-09 05:15:24 +00:00
|
|
|
fi
|