Root/
| 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 |
| 18 |
