Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Perform an action when network cable unplugged (and back in again)



On Wed, 13 Jun 2012 11:07:16 +0900
Jawaad Mahmood <jawaad.mahmood@example.com> wrote:

> > Does such a thing even exist?
> >
> >
> It does exist.
> 
> http://stackoverflow.com/questions/10340145/get-event-for-nic-ethernet-card-link-status-on-linux
> 
> I don't have time to program it for you right now, but it seems one can
> handle netlink socket connections through python:
> 
> http://stackoverflow.com/questions/4676866/how-can-i-use-a-netlink-socket-to-data-from-kernel-space-in-python
> 
> This looks promising at least..

Hmm.. i would have first looked whether udev gets an event. If it does,
then you can just use standard shell scripts instead of hooking into netlink.

			Attila Kinali

-- 
Why does it take years to find the answers to
the questions one should have asked long ago?


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links