[package] uhttpd:
[openwrt.git] / package / br2684ctl / files / br2684ctl
1 #!/bin/sh /etc/rc.common
2 START=50
3
4 stop() {
5 killall br2684ctl 2>/dev/null >/dev/null
6 sleep 1
7 rmmod br2684
8 }
9
10 start_daemon() {
11 local cfg="$1"
12 config_get atmdev "$cfg" atmdev
13 config_get unit "$cfg" unit
14 config_get vpi "$cfg" vpi
15 config_get vci "$cfg" vci
16 config_get encaps "$cfg" encaps
17 config_get payload "$cfg" payload
18 config_get qos "$cfg" qos
19 case "$encaps" in
20 1|vc) encaps=1;;
21 *) encaps=0;;
22 esac
23 case "$payload" in
24 0|routed) payload=0;;
25 *) payload=1;;
26 esac
27 [ "$qos" ] && qos="-q $qos"
28 br2684ctl -b -c "$unit" -e "$encaps" -p "$payload" $qos -a "${atmdev:+$atmdev.}${vpi:-8}.${vci:-35}"
29 }
30
31 start() {
32 insmod br2684 >/dev/null 2>/dev/null
33 config_load network
34 config_foreach start_daemon atm-bridge
35 }
This page took 0.041652 seconds and 5 git commands to generate.