FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 08-28-2012, 10:15 AM
Patrick Dupre
 
Default Disconnect

Hello,

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.

Thank for your help.

Regards.

--
================================================== ====================
Patrick DUPRÉ | | email: pdupre@kegtux.org
================================================== ====================
--
users mailing list
users@lists.fedoraproject.org
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
 
Old 08-28-2012, 02:04 PM
Marko Vojinovic
 
Default Disconnect

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.

HTH, :-)
Marko


--
users mailing list
users@lists.fedoraproject.org
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
 
Old 08-28-2012, 02:13 PM
Patrick Dupre
 
Default Disconnect

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!

--
================================================== ====================
Patrick DUPRÉ | | email: pdupre@kegtux.org
================================================== ====================
--
users mailing list
users@lists.fedoraproject.org
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
 
Old 08-28-2012, 03:49 PM
Kevin Martin
 
Default Disconnect

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

--
users mailing list
users@lists.fedoraproject.org
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
 
Old 08-28-2012, 06:19 PM
"Mikkel L. Ellertson"
 
Default Disconnect

-----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@lists.fedoraproject.org
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
 
Old 08-28-2012, 10:49 PM
Patrick Dupre
 
Default Disconnect

On 2012-08-28 20:19, Mikkel L. Ellertson wrote:

-----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.


I tried, but /sbin/ifdown-pre-local is never activated
ifdown ppp0 gives: usage: ifdown <device name>
ppp0 is not recognized as a device!

I also tried to use /etc/NetworkManager/dispatcher.d/20-ifdown
but it is also never activated.
I though that /etc/sysconfig/network-scripts/ifdown-ppp
could do the job, but again it is never activate when I disconnect the
network.


This is the result of ifconfig ppp0
ppp0 Link encap:Point-to-Point Protocol
inet addr:111.169.43.118 P-t-P:10.64.64.64
Mask:255.255.255.255

UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:1370 errors:0 dropped:0 overruns:0 frame:0
TX packets:1381 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1741245 (1.6 MiB) TX bytes:94465 (92.2 KiB)


Other ideas?

Thank.

--
================================================== ====================
Patrick DUPRÉ | | email: pdupre@kegtux.org
================================================== ====================
--
users mailing list
users@lists.fedoraproject.org
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
 
Old 08-29-2012, 09:55 AM
Pasha R
 
Default Disconnect

On Wed, Aug 29, 2012 at 1:49 AM, Patrick Dupre <pdupre@kegtux.org> wrote:
> On 2012-08-28 20:19, Mikkel L. Ellertson wrote:
>>
>> -----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.
>>
> I tried, but /sbin/ifdown-pre-local is never activated
> ifdown ppp0 gives: usage: ifdown <device name>
> ppp0 is not recognized as a device!
>
> I also tried to use /etc/NetworkManager/dispatcher.d/20-ifdown
> but it is also never activated.
> I though that /etc/sysconfig/network-scripts/ifdown-ppp
> could do the job, but again it is never activate when I disconnect the
> network.
>
> This is the result of ifconfig ppp0
> ppp0 Link encap:Point-to-Point Protocol
> inet addr:111.169.43.118 P-t-P:10.64.64.64 Mask:255.255.255.255
> UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
> RX packets:1370 errors:0 dropped:0 overruns:0 frame:0
> TX packets:1381 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:3
> RX bytes:1741245 (1.6 MiB) TX bytes:94465 (92.2 KiB)
>
>
> Other ideas?

Try to create /etc/ppp/ip-down.local script. I'm not sure if it will
be activated by NM, but worth trying.
--
users mailing list
users@lists.fedoraproject.org
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
 
Old 08-29-2012, 05:17 PM
Michael Cronenworth
 
Default Disconnect

Patrick Dupre wrote:
>
> Other ideas?

Here's an explanation from the author of NetworkManager on why there are
no "pre-down" scripts.

http://old.nabble.com/Re%3A-Interface-UP-Scripting-p22310908.html

You're on your own to invent what you want.
--
users mailing list
users@lists.fedoraproject.org
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
 
Old 08-29-2012, 05:49 PM
Joe Zeff
 
Default Disconnect

On 08/29/2012 10:17 AM, Michael Cronenworth wrote:

Patrick Dupre wrote:


Other ideas?


Here's an explanation from the author of NetworkManager on why there are
no "pre-down" scripts.

http://old.nabble.com/Re%3A-Interface-UP-Scripting-p22310908.html

You're on your own to invent what you want.



About what I would have guessed: by the time the script gets run the
connection's already down. Maybe what you need, Patrick, is a script
that periodically checks to see if the connection's up and if so, writes
out the data you're looking for to a file, overwriting the old data.
Have it start when your connection goes up and exit when the connection
drops. That way, you can check it, rename it or whatever before
re-establishing connectivity.

--
users mailing list
users@lists.fedoraproject.org
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
 
Old 08-30-2012, 10:43 PM
Patrick Dupre
 
Default Disconnect

On 2012-08-29 11:55, Pasha R wrote:
On Wed, Aug 29, 2012 at 1:49 AM, Patrick Dupre <pdupre@kegtux.org>
wrote:

On 2012-08-28 20:19, Mikkel L. Ellertson wrote:


-----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.


I tried, but /sbin/ifdown-pre-local is never activated
ifdown ppp0 gives: usage: ifdown <device name>
ppp0 is not recognized as a device!

I also tried to use /etc/NetworkManager/dispatcher.d/20-ifdown
but it is also never activated.
I though that /etc/sysconfig/network-scripts/ifdown-ppp
could do the job, but again it is never activate when I disconnect
the

network.

This is the result of ifconfig ppp0
ppp0 Link encap:Point-to-Point Protocol
inet addr:111.169.43.118 P-t-P:10.64.64.64
Mask:255.255.255.255

UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:1370 errors:0 dropped:0 overruns:0 frame:0
TX packets:1381 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1741245 (1.6 MiB) TX bytes:94465 (92.2 KiB)


Other ideas?


Try to create /etc/ppp/ip-down.local script. I'm not sure if it will
be activated by NM, but worth trying.
Yes, try, because I found the information somewhere, but it just does
not

either.
The reasons has been given in a previous email.

Thank for your help.

--
================================================== ====================
Patrick DUPRÉ | | email: pdupre@kegtux.org
================================================== ====================
--
users mailing list
users@lists.fedoraproject.org
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
 

Thread Tools




All times are GMT. The time now is 10:04 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org