You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.2 KiB

# This script performs default actions. It is invoked with CONFIG set
# for the subhost.
OVERLAYDIR="$(dirname $(realpath $0))"
. $OVERLAYDIR/functions
subhost_name "$CONFIG"
# setup $LIVE/dev
mkdir -p "$LIVE/dev"
mount -t tmpfs -osize=50M devtmpfs "$LIVE/dev"
mknod -m 622 "$LIVE/dev/console" c 5 1
mknod -m 666 "$LIVE/dev/null" c 1 3
mknod -m 666 "$LIVE/dev/zero" c 1 5
mknod -m 666 "$LIVE/dev/ptmx" c 5 2
mknod -m 666 "$LIVE/dev/tty" c 5 0
mknod -m 444 "$LIVE/dev/random" c 1 8
mknod -m 444 "$LIVE/dev/urandom" c 1 9
chown root:tty "$LIVE/dev/console"
chown root:tty "$LIVE/dev/ptmx"
chown root:tty "$LIVE/dev/tty"
ln -sTf /proc/self/fd "$LIVE/dev/fd"
ln -sTf /proc/self/fd/0 "$LIVE/dev/stdin"
ln -sTf /proc/self/fd/1 "$LIVE/dev/stdout"
ln -sTf /proc/self/fd/2 "$LIVE/dev/stderr"
ln -sTf /proc/kcore "$LIVE/dev/core"
mkdir "$LIVE/dev/shm"
mkdir "$LIVE/dev/pts"
chmod 1777 "$LIVE/dev/shm"
mount -t devpts devpts $LIVE/dev/pts
mount -t sysfs sysfs $LIVE/sys
if [ "$RAM_SIZE" != "none" ] ; then
mount -t tmpfs -osize=$RAM_SIZE,mode=755 tmpfs $LIVE/run
echo "Installing $OVERLAYDIR/reaper to $LIVE/.reaper"
cp -p $OVERLAYDIR/reaper $LIVE/.reaper