balena-supervisor/entry.sh
Petros Angelatos eee400f39f integrate with busybox init system
busybox's init uses /etc/inittab for configuration just like sysvinit,
however it doesn't use any runlevels.

the tty part of inittab is appended to "/dev/", and it becomes connected
to the stdout of the spawned process

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-09-14 01:38:35 +00:00

23 lines
476 B
Bash
Executable File

#!/bin/sh
set -o errexit
[ -d /dev/net ] ||
mkdir -p /dev/net
[ -c /dev/net/tun ] ||
mknod /dev/net/tun c 10 200
mount -t tmpfs -o size=1m tmpfs /var/run/resin
# 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