Script for ADSL connection Reproducible: Always This is VERY bad example of scripting. I don't like the way ppp is called (not checking exit code, and I don't know how to check it). In order for "set redial" statement to work, ppp must be ran in ddial mode (only mode supporting this), and default behavior for ddir is to go to background. Anyone has any idea about this?
Created attachment 115760 [details] Script for ADSL interface config Not really usable unless /etc/ppp/ppp.conf is configured right
Hmm, what's this about exactly? You should use the PPP baselayout module for ADSL connections, see [1] and /etc/conf.d/net.example [1] http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=3#doc_chap4
(In reply to comment #2) > Hmm, what's this about exactly? You should use the PPP baselayout module for > ADSL connections, see [1] and /etc/conf.d/net.example Sadly, Linux ppp is wildly different from BSD ppp, so that does not apply here. Currently, BSD doesn't have any net modules beyond basic interface, dhcp and wireless (iwconfig a like and wpa_supplicant).
(In reply to comment #3) > Sadly, Linux ppp is wildly different from BSD ppp, so that does not apply here. LOL, I need more coffee or beer in the morning... :P Completely missed that this is about *BSD, sorry.
(In reply to comment #0) > Script for ADSL connection > > This is VERY bad example of scripting. I don't like the way ppp is called (not > checking exit code, and I don't know how to check it). In order for "set > redial" statement to work, ppp must be ran in ddial mode (only mode supporting > this), and default behavior for ddir is to go to background. Anyone has any > idea about this? Yes, that is not good. First off the bat, why don't you attach the full output that is passed to grep. I'm guessing it's the interface name that will be used. Also we should be trying to use one sed call instead of grep + awk. If you don't know sed, simply attach the full output can I can write the sed for it easily enough. Lastly, you can store the exit code of pppd by storing $? in a variable immediately after launching like so local tun=`ppp -ddial ${!provider} | grep tun | awk '{ print $3 }'` local retval=$?
*** Bug 192460 has been marked as a duplicate of this bug. ***
I'm not sure this bug is still relevant. Closing.