-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/28/2012 10:49 AM, Kevin Martin wrote: > On 08/28/2012 09:13 AM, Patrick Dupre wrote: >> On 2012-08-28 16:04, Marko Vojinovic wrote: >>> On Tuesday, 28. August 2012. 12.15.16 Patrick Dupre wrote: >>>> The NetworkNamager provides a disconnect option. I undertand that it >>>> can be manager through /etc/NetworkManager/dispatcher.d >>>> However, when I disconnect the ppp0 connection, ppp0 is already >>>> down (due to the disconnect) and prevents me to collect information >>>> through ifconfig. >>>> >>>> How can I avoid this problem. I wish to collect information of the >>>> ppp0 just before it is turned off. >>> >>> Wasn't this covered in another thread already? >>> >>> If you want to see ifconfig output just before disconnecting, open a >>> terminal, >>> type "ifconfig", read the output, then disconnect. It's pretty obvious, I >>> guess. >>> >>> So, the nonobvious thing is: what precisely is the actual problem you are >>> trying to solve? Please try to be more precise. >>> >> I want it does it automatically! >> > > The problem I see in what you are trying to do is that there is no way to determine when exactly a disconnect will be taking place. > If you know exactly when a disconnect will take place then it should be fairly simple to script it but if the disconnects take > place randomly there is no way you'll be able to script it. You would have to have a program (daemon) running with hooks into the > network stack that reported statistics at the time of the disconnect and I don't think that's easy to do and certainly would require > an in depth knowledge of programming at the driver level to do it. > > Kevin > One thing you could try is creating a /sbin/ifdown-pre-local script. You will have to do a compare of $1 with ppp0, and exit if it is a different interface, because it is run before bringing any interface down. I am not sure if Network Manager uses the ifdown script, but you could alway run ifdown ppp0 to disconnect. This will not help if the interface goes down without you telling it to. Mikkel - -- Do not meddle in the affairs of dragons, for thou art crunchy and taste good with Ketchup! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlA9C6QACgkQqbQrVW3JyMRUlgCeNzWM/0exYB6xL7cPmgTTjwnf 68IAn0fZKsiPPqncYz8EJ96AuHCd8qov =iZPl -----END PGP SIGNATURE----- -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org