diff options
author | Richard Purdie <richard@openedhand.com> | 2006-09-28 14:21:06 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-09-28 14:21:06 +0000 |
commit | eb83f4bb4e05b8a8c12340be1e1d03d136cb6811 (patch) | |
tree | e74897973e410d3648ef5fe8eb433048104e007d /meta/packages/sysvinit/sysvinit/rcS | |
parent | b462c8bee52fafc1eade2d913d3a50dc301a3fdf (diff) | |
download | poky-eb83f4bb4e05b8a8c12340be1e1d03d136cb6811.tar.gz |
sysvinit: Add psplash support, remove elpp support, convert rcS to use rc, speedup execution of sh scripts
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@771 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/sysvinit/sysvinit/rcS')
-rwxr-xr-x | meta/packages/sysvinit/sysvinit/rcS | 56 |
1 files changed, 1 insertions, 55 deletions
diff --git a/meta/packages/sysvinit/sysvinit/rcS b/meta/packages/sysvinit/sysvinit/rcS index e7a7e617d0..90af4149e4 100755 --- a/meta/packages/sysvinit/sysvinit/rcS +++ b/meta/packages/sysvinit/sysvinit/rcS | |||
@@ -36,63 +36,9 @@ fi | |||
36 | trap ":" INT QUIT TSTP | 36 | trap ":" INT QUIT TSTP |
37 | 37 | ||
38 | # | 38 | # |
39 | # Do we have /proc/progress and set VERBOSE to "no" ? | ||
40 | # If so, calculate the number of scripts and the incremental step | ||
41 | # | ||
42 | if [ "$VERBOSE" = no ]; then | ||
43 | if [ -e /proc/progress ]; then | ||
44 | set `ls -1 /etc/rc$runlevel.d/S* | wc` | ||
45 | numscripts=$1 | ||
46 | PROGRESS_incstep=`expr 90 / $1` | ||
47 | PROGRESS_value=10 | ||
48 | PROGRESS=yes | ||
49 | export PROGRESS_value PROGRESS_incstep | ||
50 | fi | ||
51 | fi | ||
52 | export VERBOSE PROGRESS | ||
53 | |||
54 | # | ||
55 | # Call all parts in order. | 39 | # Call all parts in order. |
56 | # | 40 | # |
57 | for i in /etc/rcS.d/S??* | 41 | exec /etc/init.d/rc S |
58 | do | ||
59 | # Ignore dangling symlinks for now. | ||
60 | [ ! -f "$i" ] && continue | ||
61 | |||
62 | # Handle verbosity | ||
63 | [ "$VERBOSE" = very ] && echo "INIT: Running $i..." | ||
64 | if [ "$PROGRESS" = yes ]; then | ||
65 | export PROGRESS_value=`expr $PROGRESS_value + $PROGRESS_incstep` | ||
66 | echo "$PROGRESS_value Starting $i..." >/proc/progress | ||
67 | fi | ||
68 | |||
69 | case "$i" in | ||
70 | *.sh) | ||
71 | # Source shell script for speed. | ||
72 | ( | ||
73 | trap - INT QUIT TSTP | ||
74 | set start | ||
75 | . $i | ||
76 | ) | ||
77 | ;; | ||
78 | *) | ||
79 | # No sh extension, so fork subprocess. | ||
80 | $i start | ||
81 | ;; | ||
82 | esac | ||
83 | |||
84 | # | ||
85 | # Report status based on result code | ||
86 | # | ||
87 | result=$? | ||
88 | if [ "$PROGRESS" = yes ]; then | ||
89 | if [ "$result" = 0 ]; then | ||
90 | echo "=s" >/proc/progress | ||
91 | else | ||
92 | echo "=f" >/proc/progress | ||
93 | fi | ||
94 | fi | ||
95 | done | ||
96 | 42 | ||
97 | # | 43 | # |
98 | # For compatibility, run the files in /etc/rc.boot too. | 44 | # For compatibility, run the files in /etc/rc.boot too. |