Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#7663 - Additional PPP functionality for netcfg
Attached to Project:
Arch Linux
Opened by Mark Constable (markc) - Wednesday, 25 July 2007, 02:19 GMT
Last edited by James Rayner (iphitus) - Wednesday, 13 February 2008, 10:16 GMT
Opened by Mark Constable (markc) - Wednesday, 25 July 2007, 02:19 GMT
Last edited by James Rayner (iphitus) - Wednesday, 13 February 2008, 10:16 GMT
|
DetailsDescription:
I could not find an obvious way to bring up a PPP(oE) interface after an ethernet interface was initialized so that a PC host could establish a PPP interface and authenticate via an ADSL modem in bridged mode (as opposed to 56K dialup). Solution: This may not be the best way to do it but I found by adding this simple extra option to /usr/bin/netcfg it then seems to offer the extra functionality I need... start_profile() { ... # starting at line 180 if [ "$PPP" ]; then pppd call $PPP fi Such that when a PPP=peers_profile variable is added to a netcfg profile then this optional extra pppd call is made. It allows for different pppd calling profiles to be used and may also be suitable for 56k dialup situations. There does not seem to be the need for an equivalnet stop_profile() entry because stopping the ethernet interface kills the pppd process, however, a stop_profile() entry may be needed if this strategy was adopted for 56k dialup. Additional info: * initscripts 0.8-12 |
This task depends upon
This task blocks these from closing
Closed by James Rayner (iphitus)
Wednesday, 13 February 2008, 10:16 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in netcfg v2.0.6
Wednesday, 13 February 2008, 10:16 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in netcfg v2.0.6
Added these 2 functions to /etc/rc.d/network
ppp_up()
{
for ppp in ${PPP_PROFILES[@]}; do
if [ "$ppp" = "${ppp#!}" ]; then
pppd call $ppp > /dev/null 2>&1
fi
done
}
ppp_down()
{
for ppp in ${PPP_PROFILES[@]}; do
if [ "$ppp" = "${ppp#!}" ]; then
kill $(head -n 1 /var/run/ppp-$ppp.pid)
fi
done
}
and also added "ppp_up" to the bottom of start) and "ppp_down" to the top of stop). The stop function depends on "linkname something" being added to /etc/ppp/peers/profile so the right pppd PID file can be found to kill off the right pppd daemon. An example PPP profile file is...
# cat /etc/ppp/peers/pppoe
plugin rp-pppoe.so
br0
name "xxxxx"
usepeerdns
persist
defaultroute
noauth
debug
linkname pppoe
I'm using the "br0" device in this case so that qemu, and probably virtualbox/vmware, can use the local PC bridged interface and also access the outside world via the ADSL modem bridged interface. Here are the /etc/rc.conf settings that work for me...
BRIDGE_INTERFACES=(br0)
bridge_br0=(eth0)
br0="br0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"
eth0="eth0 0.0.0.0"
INTERFACES=(lo br0 eth0)
PPP_PROFILES=(pppoe)
ROUTES=()
There are some other changes to netcfg too. I have introduced the PRESCRIPT variable. Stuff in this variable is run before setting the interface up. I use it like this: PRESCRIPT="/etc/Wireless/RT2500STA/craset.sh $INTERFACE homeconf" to set the config file for my legacy wlan driver. Also, I have included functionality for remembering the earlier network setup. It's nice for example when you need to reboot the machine, and want to choose the same network configuration than earlier. Information regarding last network profile is kept in /etc/network-profiles/.last . I have also versioned the script as 0.2 . Feel free to comment/use.
http://wiki.archlinux.org/index.php/Network_Scripts
James