]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/sysvinit/sysvinit/openmn/rcS
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / sysvinit / sysvinit / openmn / rcS
1 #!/bin/sh
2 #
3 # rcS           Call all S??* scripts in /etc/rcS.d in
4 #               numerical/alphabetical order.
5 #
6 # Version:      @(#)/etc/init.d/rcS  2.76  19-Apr-1999  miquels@cistron.nl
7 #
8
9 PATH=/sbin:/bin:/usr/sbin:/usr/bin
10 runlevel=S
11 prevlevel=N
12 umask 022
13 export PATH runlevel prevlevel
14
15 #
16 #       See if system needs to be setup. This is ONLY meant to
17 #       be used for the initial setup after a fresh installation!
18 #
19 if [ -x /sbin/unconfigured.sh ]
20 then
21   /sbin/unconfigured.sh
22 fi
23
24 #
25 #       Source defaults.
26 #
27 . /etc/default/rcS
28 export VERBOSE
29
30 #
31 #       Trap CTRL-C &c only in this shell so we can interrupt subprocesses.
32 #
33 trap ":" INT QUIT TSTP
34
35 #
36 #       Call all parts in order.
37 #
38 for i in /etc/rcS.d/S??*
39 do
40         # Ignore dangling symlinks for now.
41         [ ! -f "$i" ] && continue
42
43         # Handle verbosity
44         [ "$VERBOSE" = very ] && echo "INIT: Running $i..."
45
46         case "$i" in
47                 *.sh)
48                         # Source shell script for speed.
49                         (
50                                 trap - INT QUIT TSTP
51                                 set start
52                                 . $i
53                         )
54                         ;;
55                 *)
56                         # No sh extension, so fork subprocess.
57                         $i start
58                         ;;
59         esac
60
61         #
62         # Report status based on result code
63         #
64         result=$?
65 done
66
67 #
68 #       For compatibility, run the files in /etc/rc.boot too.
69 #
70 [ -d /etc/rc.boot ] && run-parts /etc/rc.boot
71
72 #
73 #       Finish setup if needed. The comment above about
74 #       /sbin/unconfigured.sh applies here as well!
75 #
76 if [ -x /sbin/setup.sh ]
77 then
78   /sbin/setup.sh
79 fi