From c527fd1f14c27855a37f2e8ac5346ce8d940ced2 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 16 Oct 2014 03:05:19 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- meta-yocto/recipes-core/tiny-init/files/init | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 meta-yocto/recipes-core/tiny-init/files/init (limited to 'meta-yocto/recipes-core/tiny-init/files/init') diff --git a/meta-yocto/recipes-core/tiny-init/files/init b/meta-yocto/recipes-core/tiny-init/files/init new file mode 100644 index 0000000000..9140e9558e --- /dev/null +++ b/meta-yocto/recipes-core/tiny-init/files/init @@ -0,0 +1,26 @@ +#!/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 -- cgit v1.2.3-54-g00ecf