summaryrefslogtreecommitdiffstats
path: root/meta-yocto/recipes-core/tiny-init/files/init
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:38:32 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:50:20 +0100
commite2e6f6fe07049f33cb6348780fa975162752e421 (patch)
treeb1813295411235d1297a0ed642b1346b24fdfb12 /meta-yocto/recipes-core/tiny-init/files/init
downloadpoky-e2e6f6fe07049f33cb6348780fa975162752e421.tar.gz
initial commit of Enea Linux 3.1
Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta-yocto/recipes-core/tiny-init/files/init')
-rw-r--r--meta-yocto/recipes-core/tiny-init/files/init26
1 files changed, 26 insertions, 0 deletions
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 @@
1#!/bin/sh
2
3# Mount the Linux kernel virtual filesystems
4mount none -t proc /proc
5mount none -t sysfs /sys
6
7# Ensure devtmpfs is mounted, it must be done manually with initramfs
8mount none -t devtmpfs /dev
9
10# Setup PTY infrastructure
11mkdir /dev/pts
12mount none -t devpts /dev/pts
13
14ifup lo
15
16# Allow for distro or local customizations
17if [ -f /etc/rc.local ] ; then
18 . /etc/rc.local
19fi
20
21# Become session leader and try to find a real tty (e.g. ttyS0)
22while true; do
23 setsid cttyhack sh
24 echo "Console sh exited with $?, respawning..."
25 sleep 1
26done