summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild3
-rwxr-xr-xsrc/etc/init.d/rc27
-rw-r--r--src/etc/inittab16
3 files changed, 46 insertions, 0 deletions
diff --git a/build b/build
index e8adf8e..ada894c 100755
--- a/build
+++ b/build
@@ -31,6 +31,9 @@ basefiles.buildstamp:
ln -sv share/man usr/local/man && \
mkdir -pv var/cache var/lib/misc var/local var/lock var/log var/mail \
var/opt var/run var/spool
+ cd dest && \
+ ln -s rc etc/init.d/rcS && \
+ ln -s rc etc/init.d/rcK
oh-installfiles basefiles
oh-installdocs basefiles
oh-gencontrol basefiles
diff --git a/src/etc/init.d/rc b/src/etc/init.d/rc
new file mode 100755
index 0000000..9caffe7
--- /dev/null
+++ b/src/etc/init.d/rc
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# /etc/init.d/rc
+# Executes init scripts on init and shutdown.
+#
+# Copyright (C) 2012 Patrick "P. J." McDermott
+# This file may be reproduced, distributed, modified, and otherwise dealt in
+# under the terms of the Expat/MIT License.
+
+[ -x /usr/bin/logger ] && logger='logger -s -p 6 -t sysinit' || logger=cat
+
+level=${0#*/rc}
+case ${level} in
+ S)
+ action=start
+ ;;
+ K)
+ action=stop
+ ;;
+ *)
+ exit 1
+ ;;
+esac
+
+for i in /etc/init.d/${level}*; do
+ [ -x "${i}" ] && "${i}" ${action} 2>&1
+done | ${logger}
diff --git a/src/etc/inittab b/src/etc/inittab
new file mode 100644
index 0000000..f09bf06
--- /dev/null
+++ b/src/etc/inittab
@@ -0,0 +1,16 @@
+# /etc/inittab
+
+::sysinit:/etc/init.d/rcS
+::shutdown:/etc/init.d/rcK
+
+tty1::askfirst:/sbin/getty 38400 tty1
+tty2::askfirst:/sbin/getty 38400 tty2
+tty3::askfirst:/sbin/getty 38400 tty3
+tty4::askfirst:/sbin/getty 38400 tty4
+tty5::askfirst:/sbin/getty 38400 tty5
+tty6::askfirst:/sbin/getty 38400 tty6
+
+::respawn:/sbin/getty -L ttyS0 115200 vt100
+
+::ctrlaltdel:/bin/umount -a -r
+::ctrlaltdel:/sbin/swapoff