# /etc/init.d/net.ppp0  und  T-DSL

## EliasP

Hi

Ich muss nach jedem Booten mein DSL "von Hand" per adsl-start einwählen.

Mit /etc/init.d/net.ppp0 automatisch beim Starten einwählen lassen funktioniert es leider nicht so ganz, ich krieg dabei nur diese Meldung:

```

/etc/init.d/net.ppp0 start

 * Bringing ppp0 up...

/usr/sbin/pppd: unrecognized option '-device'

pppd version 2.4.1

Usage: /usr/sbin/pppd [ options ], where options are:

        <device>        Communicate over the named device

        <speed>         Set the baud rate to <speed>

        <loc>:<rem>     Set the local and/or remote interface IP

                        addresses.  Either one may be omitted.

        asyncmap <n>    Set the desired async map to hex <n>

        auth            Require authentication from peer

        connect <p>     Invoke shell command <p> to set up the serial line

        crtscts         Use hardware RTS/CTS flow control

        defaultroute    Add default route through interface

        file <f>        Take options from file <f>

        modem           Use modem control lines

        mru <n>         Set MRU value to <n> for negotiation

See pppd(8) for more options.

```

Meine /etc/ppp/chat-t-online

```

# /etc/ppp/chat-default:

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/ppp/chat-default,v 1.4 2002/11/18 19:39:22 azarah Exp $

'ABORT' 'BUSY'

'ABORT' 'ERROR'

'ABORT' 'NO ANSWER'

'ABORT' 'NO CARRIER'

'ABORT' 'NO DIALTONE'

'ABORT' 'Invalid Login'

'ABORT' 'Login incorrect'

'' 'ATZ'

'OK' 'ATDT0'

'CONNECT' ''

'TIMEOUT' '5'

'~--' ''

```

Meine /etc/ppp/peers/t-online

```

connect '/usr/sbin/chat -v -f /etc/ppp/chat-t-online'

```

Meine /etc/init.d/net.ppp0

```

# /etc/conf.d/net.ppp0:

# $Header: /home/cvsroot/gentoo-x86/net-dialup/ppp/files/confd.ppp0,v 1.1 2003/05/23 04:45:18 killian Exp $

# Config file for /etc/init.d/net.ppp0

PEER="t-online"                   # Define peer (aka ISP)

DEBUG="no"                      # Turn on debugging

PERSIST="yes"                    # Redial after being dropped

ONDEMAND="no"                   # Only bring the interface up on demand?

MODEMPORT="-device ${1##*.}"          # TTY device modem is connected to

#LINESPEED="115200"              # Speed pppd should try to connect at

#INITSTRING=""                   # Extra init string for the modem

DEFROUTE="yes"                  # Must pppd set the default route?

HARDFLOWCTL="yes"               # Use hardware flow control?

ESCAPECHARS="yes"               # Use escape caracters ?

PPPOPTIONS=""                   # Extra options for pppd

USERNAME="ATM@t-online.de"                 # The PAP/CHAP username

PASSWORD="pass"               # Your password/secret.  Ugly I know, but i

                                # will work on something more secure later

                                # on.  700 permission on /etc/init.d/net.ppp0

                                # should be enouth for now.

#NUMBER=""                # The telephone number of your ISP

#REMIP=""                        # The ip of the remote box if it should be set

#NETMASK=""                      # Netmask

#IPADDR=""                       # Our IP if we have a static one

#MRU="768"                       # Sets the MRU

MTU="1492"                       # Sets the MTU

RETRYTIMEOUT="60"               # Retry timeout for when ONDEMAND="yes" or

                                # PERSIST="yes"

IDLETIMEOUT="600"               # Idle timeout for when ONDEMAND="yes"

PEERDNS="yes"                    # Should pppd set the peer dns?

# This does not currently work due to a bug in pppd (I think)

FWSCRIPT="/etc/init.d/firewall" # Optional FW script that pppd should start

                                # and stop when the link comes up or drop.

                                # It should be a script that takes one

                                # argument, namely the action that should

                                # be taken (start|stop).  The name of the

                                # external interface on which the firewall

                                # should be activated, should be hardcoded

                                # into the script (you will tipically have

                                # fw.ppp0, fw.ppp1, etc if you have more than

                                # one ppp interface).

                                #

                                # called: ${FWSCRIPT} [start|stop]

AUTOCFGFILES="no"              # By default this scripts will generate

                                # /etc/ppp/chat-isp, /etc/ppp/chap-secrets,

                                # /etc/ppp/pap-secrets and /etc/ppp/peers/isp

                                # automagically.  Set to "no" if you experience

                                # problems, or need specialized scripts.  You

                                # will have to create these files by hand then.

                                # Also, the FWSCRIPT feature will not work.

# Directory where the templates is stored

TEMPLATEDIR=/etc/ppp

```

Weiß jmd. wie dieses Problem zu lösen ist ?? 

Vielen Dank!

Gruß

Elias P.

----------

## MasterOfMagic

hm du könntest mal in /etc/init.d/net.ppp0 gucken wo dieses -device vorkommt und versuchen das zu reparieren.

mfg

masterofmagic

----------

## EliasP

"-device" kommt ja bei

MODEMPORT=""

vor, aber egal was ich einsetz, pppd will den Parameter nicht richtig annehmen....

könnte vielleicht einfach jemand, bei dem T-DSL funktioniert, seine /etc/init.d/net.ppp0 zum Vergleich posten??

Vielen Dank

Elias P.

----------

## glasen

Hi,

Ich hab mir selbst ein Skript geschrieben (besser gesagt ein vorhandenes abgewandelt). Es ruft beim Start adsl-connect auf und wenn ich denn Rechner runterfahre adsl-stop auf.

 *Quote:*   

> 
> 
> #!/sbin/runscript
> 
> # Copyright 1999-2003 Gentoo Technologies, Inc.
> ...

 

In /etc/init.d als adsl kopieren, ausführbar machen und mit rc-update add adsl default automatisch starten lassen. Funktioniert einwandfrei.

----------

## EliasP

@glasen:

Danke!! Werd das mal testen...  hab sowas in der Art auch schon probiert, ist dann aber irgendwie immer schiefgegangen...  :Wink: )

Gruß

Elias P.

----------

## EliasP

Danke, es funktioniert einwandfrei !!  :Wink: 

Gruß

Elias P.

----------

