|
|
[[ ${plugin[0]} == "pppoa" ]] && plugin[0]="pppoatm" | [[ ${plugin[0]} == "pppoa" ]] && plugin[0]="pppoatm" |
[[ ${plugin[0]} == "capi" ]] && plugin[0]="capiplugin" | [[ ${plugin[0]} == "capi" ]] && plugin[0]="capiplugin" |
| |
[[ ${plugin[0]} == "rp-pppoe" ]] && opts="${opts} connect true" |
if [[ ${plugin[0]} == "rp-pppoe" || ${plugin[0]} == "pppoatm" ]] ; then |
opts="${opts} plugin ${plugin[0]}.so ${plugin[@]:1}" |
opts="${opts} connect true plugin ${plugin[0]}.so ${plugin[@]:1} ${!link}" |
[[ ${plugin[0]} == "rp-pppoe" ]] && opts="${opts} ${!link}" |
else |
|
opts="${opts} plugin ${plugin[0]}.so ${plugin[@]:1}" |
|
fi |
done | done |
| |
#Specialized stuff. Insert here actions particular to connection type (pppoe,pppoa,capi) | #Specialized stuff. Insert here actions particular to connection type (pppoe,pppoa,capi) |
|
|
fi | fi |
| |
if [[ " ${opts} " == *" plugin pppoatm.so "* ]] ; then | if [[ " ${opts} " == *" plugin pppoatm.so "* ]] ; then |
|
if [[ ! ( ${!link} =~ '^[ \t]*([1-9]*[0-9]\.){1,2}[1-9]*[0-9][ \t]*$' ) ]] ; then |
|
eerror "an [itf.]vpi.vci ATM address was expected in ${link}" |
|
return 1 |
|
fi |
|
|
if [[ ! -d /proc/net/atm ]] ; then | if [[ ! -d /proc/net/atm ]] ; then |
# Load the PPPoA kernel module | # Load the PPPoA kernel module |
if ! modprobe pppoatm ; then | if ! modprobe pppoatm ; then |
|
|
return 1 | return 1 |
fi | fi |
fi | fi |
|
|
|
insert_link_in_opts=0 |
fi | fi |
[[ ${insert_link_in_opts} -eq 0 ]] || opts="${!link} ${opts}" | [[ ${insert_link_in_opts} -eq 0 ]] || opts="${!link} ${opts}" |
| |