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)



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

Interesting idea... but how do I know if udev gets an event?

I can tell you that out of all the logs (*) in /var/log/ that only these
three get the "r8169: eth0: link down" message:
   kern.log
   messages
   syslog

Darren

*: Specifically:
  cd /var/log
  tail -f * */*
 (and wait for it to settle down, then pull out the network cable)



-- 
Darren Cook, Software Researcher/Developer

http://dcook.org/work/ (About me and my work)
http://dcook.org/blogs.html (My blogs and articles)


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links