mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-30 22:29:43 +02:00
a072224e49
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20266 3c298f89-4303-0410-b956-a3cf2f4a3e73
36 lines
771 B
Bash
Executable File
36 lines
771 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
START=50
|
|
|
|
stop() {
|
|
killall br2684ctl 2>/dev/null >/dev/null
|
|
sleep 1
|
|
rmmod br2684
|
|
}
|
|
|
|
start_daemon() {
|
|
local cfg="$1"
|
|
config_get atmdev "$cfg" atmdev
|
|
config_get unit "$cfg" unit
|
|
config_get vpi "$cfg" vpi
|
|
config_get vci "$cfg" vci
|
|
config_get encaps "$cfg" encaps
|
|
config_get payload "$cfg" payload
|
|
config_get qos "$cfg" qos
|
|
case "$encaps" in
|
|
1|vc) encaps=1;;
|
|
*) encaps=0;;
|
|
esac
|
|
case "$payload" in
|
|
0|routed) payload=0;;
|
|
*) payload=1;;
|
|
esac
|
|
[ "$qos" ] && qos="-q $qos"
|
|
br2684ctl -b -c "$unit" -e "$encaps" -p "$payload" $qos -a "${atmdev:+$atmdev.}${vpi:-8}.${vci:-35}"
|
|
}
|
|
|
|
start() {
|
|
insmod br2684 >/dev/null 2>/dev/null
|
|
config_load network
|
|
config_foreach start_daemon atm-bridge
|
|
}
|