--- pppd.sh-2101 2006-08-23 13:16:58.000000000 +0200 +++ pppd.sh 2006-08-23 14:04:12.000000000 +0200 @@ -144,9 +144,11 @@ [[ ${plugin[0]} == "pppoa" ]] && plugin[0]="pppoatm" [[ ${plugin[0]} == "capi" ]] && plugin[0]="capiplugin" - [[ ${plugin[0]} == "rp-pppoe" ]] && opts="${opts} connect true" - opts="${opts} plugin ${plugin[0]}.so ${plugin[@]:1}" - [[ ${plugin[0]} == "rp-pppoe" ]] && opts="${opts} ${!link}" + if [[ ${plugin[0]} == "rp-pppoe" || ${plugin[0]} == "pppoatm" ]] ; then + opts="${opts} connect true plugin ${plugin[0]}.so ${plugin[@]:1} ${!link}" + else + opts="${opts} plugin ${plugin[0]}.so ${plugin[@]:1}" + fi done #Specialized stuff. Insert here actions particular to connection type (pppoe,pppoa,capi) @@ -168,6 +170,11 @@ fi 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 # Load the PPPoA kernel module if ! modprobe pppoatm ; then @@ -175,6 +182,8 @@ return 1 fi fi + + insert_link_in_opts=0 fi [[ ${insert_link_in_opts} -eq 0 ]] || opts="${!link} ${opts}"