diff options
Diffstat (limited to 'sources/target_skeleton/etc/init.d')
-rwxr-xr-x | sources/target_skeleton/etc/init.d/S01mount | 15 | ||||
-rwxr-xr-x | sources/target_skeleton/etc/init.d/S05ramdisk1 | 51 | ||||
-rwxr-xr-x | sources/target_skeleton/etc/init.d/S15modules | 5 | ||||
-rwxr-xr-x | sources/target_skeleton/etc/init.d/S20syslogd | 8 | ||||
-rwxr-xr-x | sources/target_skeleton/etc/init.d/S50hostname | 3 | ||||
-rwxr-xr-x | sources/target_skeleton/etc/init.d/rcS | 27 |
6 files changed, 109 insertions, 0 deletions
diff --git a/sources/target_skeleton/etc/init.d/S01mount b/sources/target_skeleton/etc/init.d/S01mount new file mode 100755 index 000000000..85d3ab5a6 --- /dev/null +++ b/sources/target_skeleton/etc/init.d/S01mount @@ -0,0 +1,15 @@ +#!/bin/sh + +# Mount all filesystems. We don't mess with +# fsck, since we don't need it here... + +echo -n "Mounting local file systems: " +/bin/mount -a > /dev/null 2>&1 +if [ $? = 0 ] ; then + echo "ok" +else + echo "failed" +fi + +exit 0 + diff --git a/sources/target_skeleton/etc/init.d/S05ramdisk1 b/sources/target_skeleton/etc/init.d/S05ramdisk1 new file mode 100755 index 000000000..b8a6d70ad --- /dev/null +++ b/sources/target_skeleton/etc/init.d/S05ramdisk1 @@ -0,0 +1,51 @@ +#!/bin/sh + +# Build a ramdisk to overlay on /dev so we can scribble on it +# all we want without needing rw access to the underlying filesystem + +SIZE=140 +INODES=1000 + +echo -n "Building device ramdisk: " + +/bin/umount /dev/ram1 >/dev/null 2>&1 + +/bin/dd if=/dev/zero of=/dev/ram1 bs=1k count=$SIZE >/dev/null 2>&1 +if [ $? != 0 ] ; then + echo "failed." + exit 1; +fi + +/sbin/mkfs.minix -n30 -i$INODES /dev/ram1 $SIZE >/dev/null 2>&1 +if [ $? != 0 ] ; then + echo "failed." + exit 1; +fi + +/bin/mount /dev/ram1 /mnt -t minix -o rw >/dev/null 2>&1 +if [ $? != 0 ] ; then + echo "failed." + exit 1; +fi + +/bin/cp -a /dev/* /mnt >/dev/null 2>&1 +if [ $? != 0 ] ; then + echo "failed." + exit 1; +fi + +/bin/umount /mnt >/dev/null 2>&1 +if [ $? != 0 ] ; then + echo "failed." + exit 1; +fi + +/bin/mount /dev/ram1 /dev -t minix -o rw >/dev/null 2>&1 +if [ $? != 0 ] ; then + echo "failed." + exit 1; +else + echo "done." +fi + +exit 0 diff --git a/sources/target_skeleton/etc/init.d/S15modules b/sources/target_skeleton/etc/init.d/S15modules new file mode 100755 index 000000000..4ede82d67 --- /dev/null +++ b/sources/target_skeleton/etc/init.d/S15modules @@ -0,0 +1,5 @@ +#!/bin/sh +if [ -f /proc/sys/kernel/modprobe ] ; then + echo "/bin/true" >/proc/sys/kernel/modprobe +fi +#/sbin/insmod foo diff --git a/sources/target_skeleton/etc/init.d/S20syslogd b/sources/target_skeleton/etc/init.d/S20syslogd new file mode 100755 index 000000000..a88a6ff07 --- /dev/null +++ b/sources/target_skeleton/etc/init.d/S20syslogd @@ -0,0 +1,8 @@ +#!/bin/sh + +echo -n "Starting system log daemon: " +# start syslogging +/sbin/syslogd -m 0 +echo "ok" + + diff --git a/sources/target_skeleton/etc/init.d/S50hostname b/sources/target_skeleton/etc/init.d/S50hostname new file mode 100755 index 000000000..7437bc2de --- /dev/null +++ b/sources/target_skeleton/etc/init.d/S50hostname @@ -0,0 +1,3 @@ +#!/bin/sh + +hostname tester.dev.null diff --git a/sources/target_skeleton/etc/init.d/rcS b/sources/target_skeleton/etc/init.d/rcS new file mode 100755 index 000000000..de411534d --- /dev/null +++ b/sources/target_skeleton/etc/init.d/rcS @@ -0,0 +1,27 @@ +#!/bin/sh + + +# Start all init scripts in /etc/init.d +# executing them in numerical order. +# +for i in /etc/init.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 + |