[gobolinux-users] How to Start dsl connection at boot time?

rubisher rubisher at scarlet.be
Sun Jun 24 10:45:29 UTC 2007

Andy Feldman wrote:
> There's three ways to enable a new type of network at boot... but some
> are more "elegant" than others.
> The quick, basic way is to put all the steps you use to manually start
> it into /System/Settings/BootScripts/BootUp. I don't know anything
> about pppoe,
Afaik you could see this pppoe as a ppp connection with a PSTN modem excepted that you replaced the serial cable by an
ethernet cable.

> but if you had to run cmd1, cmd2, and then cmd3, you
> could add a line like this:
> Exec "Enabling PPPOE..."    cmd1; cmd2; cmd3
well as far as RP-PPPoE supplied kindly pppoe-start and pppoe-stop (amoung other kind stuff),
I suppose that:
Exec "Enabling PPPOE..."	pppoe-start

should work (not tested)

> If the commands are very long and you don't want to string them
> together on one line, write a script that has them all and then call
> the script from the BootUp file just like the above. There is a
> similar Shutdown file in the same BootScripts folder where you can put
> any disconnection commands.

> One more elegant way is to take advantage of the Network framework
> that already exists for DHCP/Static interfaces. If you add a function
> to /System/Settings/NetworkOptions called [interface]_PreUp it will be
> called before running ifconfig to bring the interface up. Similarly,
> there are PostUp, PreDown, and PostDown functions you can use for any
> steps that take place at those times.
> For example, I have a wifi connection secured with WPA2. Before I can
> take the ath0 interface up with ifconfig and get my IP with DHCP, I
> need to enable a supplicant program to handle the encryption. I have
> the following stuff in NetworkOptions:
> ath0_BootProto=DHCP
> NetworkInterfacesOnBoot=(
>    "lo"
>    "ath0"
> )
> function ath0_PreUp() {
>    echo "Enabling WPA Supplicant, please wait..."
>    wpa_supplicant -i ath0 -c
> /Users/nereusren/.wpa_supplicant/wpa2.conf -D wext -B
>    sleep 5s
> }

> Alternatively, if PPPOE is too different from Static or DHCP or you
> really want to make the "correct" solution, you could write a new
> network Task to add PPPOE as a BootProto type. Have a look at
> /System/Links/Tasks/DHCPNetworkInterface to see how it's done for
> DHCP, and you should be able to figure out how to add one for PPPOE.
> /S/L/T/Network automatically calls [BootProto]NetworkInterface for
> whatever the BootProto is in NetworkOptions, so all you need to do is
> add a PPPOENetworkInterface task.
Ok my PPPOENetworkInterface (in /S/L/T) looks like:

# PPPOE support for NetworkInterface
# Intended to be called by the Network task, not directly by the user.



# For command-line convenience
[ "$3" ] && DHCPTimeout="$3"

[ "$DHCPTimeout" ] || DHCPTimeout=5

case "$1" in
=== <> ===

and my /System/Settings/NetworkOptions

#eth0_BootProto=Static   # DHCP (requires DHCPCD package), Static (default if empty)
#eth1_BootProto=Static   # DHCP (requires DHCPCD package), Static (default if empty)
ppp0_BootProto=PPPOE   # DHCP (requires DHCPCD package), Static (default if empty)

This working fine to me, i.e. for a private adsl connection to only one isp.
I don't know if it could exist somewhere installation with 2 or more adsl conection with various isp for redundency or flow 
balancing? And so in such case how to start each? (that's why I let interface in case somebody would need it?)

> If you do go this route you should consider adding the Task to the
> RP-PPPoE recipe and submitting it (or just sending it to this list) so
> others can take advantage of it.
I will check that when I will grag more knowledges on recipe.

Tia for patience (I have less time to my Linux investigation then previous years :<( )

> Hope that helps,
> -Andy
Andy thanks for help,

> On 6/9/07, rubisher <rubisher at scarlet.be> wrote:
>> I haven't encounter any pb to configure my pppoe interface to my isp.
>> I can easily start and stop it manualy but how should I started automaticaly at system boot?
>> I try to have a look at wiki pages but I just find dhcp and static as BootProto, is there any other for dsl connection?
> _______________________________________________
> gobolinux-users mailing list
> gobolinux-users at lists.gobolinux.org
> http://lists.gobolinux.org/mailman/listinfo/gobolinux-users

More information about the gobolinux-users mailing list