diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-core/toybox/toybox-inittab')
3 files changed, 79 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-core/toybox/toybox-inittab/inittab b/meta-openembedded/meta-oe/recipes-core/toybox/toybox-inittab/inittab new file mode 100644 index 000000000..ffb2f17a6 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/toybox/toybox-inittab/inittab @@ -0,0 +1,26 @@ +# STARTUP +::sysinit:/bin/mount -t proc proc /proc +::sysinit:/bin/mount -t sysfs sysfs /sys +::sysinit:/bin/mount -t devtmpfs devtmpfs /dev +::sysinit:/bin/mount -o remount,rw / +::sysinit:/bin/mkdir -p /dev/pts +::sysinit:/bin/mount -t devpts devpts /dev/pts +::sysinit:/bin/mount -a + +::sysinit:/bin/ln -sf /proc/self/fd /dev/fd +::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin +::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout +::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr + +::sysinit:/bin/hostname -F /etc/hostname + +::sysinit:/etc/init.d/rcS + +# REBOOT +::ctrlaltdel:/sbin/reboot +::shutdown:/etc/init.d/rcK +::shutdown:/bin/umount -a -r + +# RESTART INIT +::restart:/sbin/init + diff --git a/meta-openembedded/meta-oe/recipes-core/toybox/toybox-inittab/rcK b/meta-openembedded/meta-oe/recipes-core/toybox/toybox-inittab/rcK new file mode 100644 index 000000000..617d3c0c3 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/toybox/toybox-inittab/rcK @@ -0,0 +1,26 @@ +#!/bin/sh + +# Stop all init scripts in /etc/rc6.d +# executing them in numerical order. +# +for i in /etc/rc6.d/K??*; do + + # Ignore dangling symlinks (if any). + [ ! -f "$i" ] && continue + + case "$i" in + *.sh) + # Source shell script for speed. + ( + trap - INT QUIT TSTP + set stop + . $i + ) + ;; + *) + # No sh extension, so fork subprocess. + $i stop + ;; + esac +done + diff --git a/meta-openembedded/meta-oe/recipes-core/toybox/toybox-inittab/rcS b/meta-openembedded/meta-oe/recipes-core/toybox/toybox-inittab/rcS new file mode 100644 index 000000000..b8e29855d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-core/toybox/toybox-inittab/rcS @@ -0,0 +1,27 @@ +#!/bin/sh + +# Start all init scripts in /etc/rcS.d and /etc/rc5.d +# executing them in numerical order. +# + +for i in /etc/rcS.d/S??* /etc/rc5.d/S??* ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$i" ] && continue + + case "$i" in + *.sh) + # Source shell script for speed. + ( + trap - INT QUIT TSTP + set start + . $i + ) + ;; + *) + # No sh extension, so fork subprocess. + $i start + ;; + esac +done + |