Root/package/base-files/files/etc/init.d/rcS

1#!/bin/sh
2# Copyright (C) 2006 OpenWrt.org
3
4run_scripts() {
5    for i in /etc/rc.d/$1*; do
6        [ -x $i ] && $i $2 2>&1
7    done | $LOGGER
8}
9
10system_config() {
11    config_get_bool foreground $1 foreground 0
12}
13
14LOGGER="cat"
15[ -x /usr/bin/logger ] && LOGGER="logger -s -p 6 -t sysinit"
16
17. /lib/functions.sh
18
19config_load system
20config_foreach system_config system
21
22if [ "$1" = "S" -a "$foreground" != "1" ]; then
23    run_scripts "$1" "$2" &
24else
25    run_scripts "$1" "$2"
26fi
27

Archive Download this file



interactive