adsl-connection
New Distributions offer adsl-setup for configuration. You should really use it. With adsl-start and adsl-stop you manage the connection. The following skript is only for old Distries and is not usefull anymore.
#! /bin/sh
# adslconnect
# Sript for connection
#
#
DEVICE="eth0"
PPPD="/usr/sbin/pppd"
PPPOE="usr/sbin/pppoe"
SUDO="/usr/bin/sudo"
if test -x $SUDO; then
if test $UID -ne 0; then
exec $SUDO $0 $*
fi
fi
case "$1" in
stop)
echo Verbindung will be killed .........
killall pppd
;;
start)
echo establish connection ...........
$PPPD pty "$PPPOE -I $DEVICE -m 1452"
;;
*)
echo wrong or missing parameter
echo usage: $0 [start] [stop]
;;
esac
Save file as /usr/local/bin/connectadsl
Make executable :
chmod +x /usr/local/bin/connectadsl
For automatic execution of the script at startup add following line in /etc/rc.d/rc.local :
/usr/local/bin/connectadsl start
To allow everyone to stop or start the connection, you need to use sudo. Configure it with :
visudo
anwender-name ALL=(ALL) NOPASSWD:/usr/local/bin/connectadsl
einfügen. Und fertig.
to Masquerading