# old crap, unreliable, does not work after reboot
# if ! grep -q "line maintained by pppoeconf" $INTFILE ; then
# sed -i -e 's,provider dsl-provider$, provider dsl-provider\n# please do not modify the following line\n pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf\n,' $INTFILE
# fi
umask 177
# make a secure directory
TMP="`mktemp -d -p /etc/ppp`"
export TMP
sectempfile="`mktemp -p $TMP`"
export sectempfile
trap "rm -rf '$TMP'" 0 HUP INT TRAP TERM
gettext '
Most providers send the needed login information per mail. Some providers describe it in odd ways, assuming the user to input the data in their "user-friendly" setup programs. But in fact, these applications generate usuall PPP user names and passwords from the entered data. You can find the real names too and input the correct data in the dialog box.
For example, this are methods used some german providers:
Sample username (alias "login" or "login name"): 11111111111
( time=0 ; while test -f $TMP/pppoe.scan ; do time=`expr $time + 6`; echo $time; sleep 1; done ) | $DIALOG --title "$title" --gauge "$text $mmode" 10 60 0
true
fi
done
done
cd "$TMP"
if test "$force_manual" ; then
iface=$1
else
iface=`grep -l AC *.pppoe| cut -f1 -d"." | head -n1`
fi
ifacenocomma=$(echo $iface | sed -e 's/,/\\,/g')
if test -z "$iface" ; then
title=$(gettext 'NOT CONNECTED')
text=$(eval_ngettext \
'Sorry, I scanned $number interface, but the Access Concentrator of your provider did not respond. Please check your network and modem cables. Another reason for the scan failure may also be another running pppoe process which controls the modem.' \
'Sorry, I scanned $number interfaces, but the Access Concentrator of your provider did not respond. Please check your network and modem cables. Another reason for the scan failure may also be another running pppoe process which controls the modem.' \
text=$(eval_gettext 'If you continue with this program, the configuration file $OPTSFILE will be modified. Please make sure that you have a backup copy before saying Yes.
#$DIALOG --title $"POPULAR OPTIONS" --clear --yesno $"Most people using popular dialup providers prefer the options 'noauth' and 'defaultroute' in their configuration and remove the 'nodetach' option. Further, for busy providers the lcp-echo-interval could be increased. Should I check your configuration file and change these settings where neccessary?" 22 70
title=$(gettext 'POPULAR OPTIONS')
text=$(gettext "Most people using popular dialup providers prefer the options 'noauth' and 'defaultroute' in their configuration and remove the 'nodetach' option. Should I check your configuration file and change these settings where neccessary?")
text=$(gettext 'Please enter the username which you usually need for the PPP login to your provider in the input box below. If you wish to see the help screen, delete the username and press OK.')
text=$(gettext 'You need at least one DNS IP address to resolve the normal host names. Normally your provider sends you addresses of useable servers when the connection is established. Would you like to add these addresses automatically to the list of nameservers in your local /etc/resolv.conf file? (recommended)')
text=$(gettext "Many providers have routers that do not support TCP packets with a MSS higher than 1460. Usually, outgoing packets have this MSS when they go through one real Ethernet link with the default MTU size (1500). Unfortunately, if you are forwarding packets from other hosts (i.e. doing masquerading) the MSS may be increased depending on the packet size and the route to the client hosts, so your client machines won't be able to connect to some sites. There is a solution: the maximum MSS can be limited by pppoe. You can find more details about this issue in the pppoe documentation.
Should pppoe clamp MSS at 1452 bytes?
If unsure, say yes.
(If you still get problems described above, try setting to 1412 in the dsl-provider file.)")
text=$(gettext 'The DSL connection has been triggered. You can use the "plog" command to see the status or "ifconfig ppp0" for general interface info.')
text=$(gettext 'Sorry, no working ethernet card could be found. If you do have an interface card which was not autodetected so far, you probably wish to load the driver manually using the modconf utility. Run modconf now?')