2007-04-21 09:37:13 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
2007-05-10 10:38:53 +00:00
|
|
|
START=50
|
|
|
|
|
2007-04-21 09:37:13 +00:00
|
|
|
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
|
2008-04-10 14:09:04 +00:00
|
|
|
config_get payload "$cfg" payload
|
2010-03-18 11:17:42 +00:00
|
|
|
config_get qos "$cfg" qos
|
2007-04-21 09:37:13 +00:00
|
|
|
case "$encaps" in
|
|
|
|
1|vc) encaps=1;;
|
|
|
|
*) encaps=0;;
|
|
|
|
esac
|
2008-04-02 13:00:06 +00:00
|
|
|
case "$payload" in
|
2008-08-11 13:02:44 +00:00
|
|
|
0|routed) payload=0;;
|
|
|
|
*) payload=1;;
|
2008-04-02 13:00:06 +00:00
|
|
|
esac
|
2010-03-18 11:17:42 +00:00
|
|
|
[ "$qos" ] && qos="-q $qos"
|
|
|
|
br2684ctl -b -c "$unit" -e "$encaps" -p "$payload" $qos -a "${atmdev:+$atmdev.}${vpi:-8}.${vci:-35}"
|
2007-04-21 09:37:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
insmod br2684 >/dev/null 2>/dev/null
|
|
|
|
config_load network
|
|
|
|
config_foreach start_daemon atm-bridge
|
|
|
|
}
|