aboutsummaryrefslogtreecommitdiffstats
path: root/sysvinit/sysvinit/rcS
diff options
context:
space:
mode:
Diffstat (limited to 'sysvinit/sysvinit/rcS')
-rw-r--r--sysvinit/sysvinit/rcS73
1 files changed, 73 insertions, 0 deletions
diff --git a/sysvinit/sysvinit/rcS b/sysvinit/sysvinit/rcS
index e69de29bb2..183a1abe92 100644
--- a/sysvinit/sysvinit/rcS
+++ b/sysvinit/sysvinit/rcS
@@ -0,0 +1,73 @@
+#!/bin/sh
+#
+# rcS Call all S??* scripts in /etc/rcS.d in
+# numerical/alphabetical order.
+#
+# Version: @(#)/etc/init.d/rcS 2.76 19-Apr-1999 miquels@cistron.nl
+#
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+runlevel=S
+prevlevel=N
+umask 022
+export PATH runlevel prevlevel
+
+#
+# See if system needs to be setup. This is ONLY meant to
+# be used for the initial setup after a fresh installation!
+#
+if [ -x /sbin/unconfigured.sh ]
+then
+ /sbin/unconfigured.sh
+fi
+
+#
+# Source defaults.
+#
+. /etc/default/rcS
+export VERBOSE
+
+#
+# Trap CTRL-C &c only in this shell so we can interrupt subprocesses.
+#
+trap ":" INT QUIT TSTP
+
+#
+# Call all parts in order.
+#
+for i in /etc/rcS.d/S??*
+do
+ # Ignore dangling symlinks for now.
+ [ ! -f "$i" ] && continue
+
+ [ "$VERBOSE" = very ] && echo "Running $i..."
+ 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
+
+#
+# For compatibility, run the files in /etc/rc.boot too.
+#
+[ -d /etc/rc.boot ] && run-parts /etc/rc.boot
+
+#
+# Finish setup if needed. The comment above about
+# /sbin/unconfigured.sh applies here as well!
+#
+if [ -x /sbin/setup.sh ]
+then
+ /sbin/setup.sh
+fi
+