[gobolinux-users] How to Start dsl connection at boot time?
Andy Feldman
nereusren at gmail.com
Sat Jun 9 19:07:53 UTC 2007
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, but if you had to run cmd1, cmd2, and then cmd3, you
could add a line like this:
Exec "Enabling PPPOE..." cmd1; cmd2; cmd3
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.
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.
Hope that helps,
-Andy
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?
More information about the gobolinux-users
mailing list