Add the unstable version of quagga based on 0.99.11
[openwrt/svn-archive/archive.git] / skels / files / package.init
1 #!/bin/sh /etc/rc.common
2 # Sample init script reading its
3 # configuration from /etc/config/package
4 START=46
5 STOP=46
6
7 start_service() {
8 local section="$1"
9
10 include /lib/network
11 scan_interfaces
12 config_load /var/state/network
13
14 config_get LAN lan ifname
15 config_get option1 "$section" option1
16 config_get option2 "$section" option2
17
18 # Do some action with the variables
19 echo "option1 = $option1"
20 }
21
22 stop_service() {
23 local section="$1"
24
25 include /lib/network
26 scan_interfaces
27 config_load /var/state/network
28
29 config_get LAN lan ifname
30 config_get option1 "$section" option1
31 config_get option2 "$section" option2
32 }
33 start() {
34 # Do some optionnal testing
35 # before starting the program
36 config_load "package"
37 config_foreach start_service package
38 }
39
40 stop () {
41 config_load "package"
42 config_foreach stop_service package
43 }