1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-16 15:57:04 +00:00
Files
Chen Qi 7616bea24c tiny-init: fix bashism
"source" is a bashism, replace it with the posix shell compliant "."

(From meta-yocto rev: 44174721aeba2c18712818ac3698ee6807754ea7)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:03:31 +01: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