On 18/06/06, Thomas Bächler <[EMAIL PROTECTED]> wrote:
James schrieb:
> if [ "$PPP_PEER" ]; then
>       /usr/sbin/pppd call $PPP_PEER
> fi
>
> this assumes ppp forks itself, which is what the scripts lying around
> seems to suggest.

/usr/sbin/pppd call $PPP_PEER detach

This does not guarantee that the connection is up before it returns, so you could use

/usr/sbin/pppd call $PPP_PEER updetach

which may block until timeout if the connection cannot be established.

_______________________________________________
arch mailing list
[email protected]
http://www.archlinux.org/mailman/listinfo/arch

OK - it's _way_ more complicated than that.  We don't want to run ifconfig on this interface at all do we, or we'll get errors coming out our ears.  So that means that we need to check that the device is not a ppp device before we do any ifconfig stuff when bringing the IF up BUT, most importantly, we need to know what type of connection each IF has in /var/run/net to bring them down.  There are several ways that could be done but the simplest, and maybe the best, is to have another statedir call /var/run/ppp and pop the details of ppp IF in there if [ "$PPP_PEER" ], when we bring it up.

At the end of the day though all we are doing is making a hackish link to /etc/ppp/peers - it's hardly in keeping with the gorgeousness of netcfg itself..it's like walking on fresh snow...
_______________________________________________
arch mailing list
[email protected]
http://www.archlinux.org/mailman/listinfo/arch

Reply via email to