1
0
forked from brl/citadel
citadel/meta-poky/recipes-core/tiny-init/files/init
brl 098b8f982b Squashed 'poky/' content from commit 4469acdf1d
git-subtree-dir: poky
git-subtree-split: 4469acdf1d0338220f3fe2ecb5e079eea6fda375
2017-12-04 16:35:29 -05:00

27 lines
545 B
Bash

#!/bin/sh
# Mount the Linux kernel virtual filesystems
mount none -t proc /proc
mount none -t sysfs /sys
# Ensure devtmpfs is mounted, it must be done manually with initramfs
mount none -t devtmpfs /dev
# Setup PTY infrastructure
mkdir /dev/pts
mount none -t devpts /dev/pts
ifup lo
# Allow for distro or local customizations
if [ -f /etc/rc.local ] ; then
. /etc/rc.local
fi
# Become session leader and try to find a real tty (e.g. ttyS0)
while true; do
setsid cttyhack sh
echo "Console sh exited with $?, respawning..."
sleep 1
done