projects
/
openwrt.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
rcS: wait for init scripts to complete before initiating the shutdown (patch from...
[openwrt.git]
/
package
/
base-files
/
files
/
etc
/
init.d
/
rcS
1
#!/bin/sh
2
# Copyright (C) 2006 OpenWrt.org
3
4
run_scripts() {
5
for i in /etc/rc.d/$1*; do
6
[ -x $i ] && $i $2 2>&1
7
done | $LOGGER
8
}
9
10
LOGGER="cat"
11
[ -x /usr/bin/logger ] && LOGGER="logger -s -p 6 -t sysinit"
12
13
if [ "$1" = "S" ]; then
14
run_scripts "$1" "$2" &
15
else
16
run_scripts "$1" "$2"
17
fi