Mailing List Archive
tlug.jp Mailing List tlug archive tlug 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): have udev call you
- Date: Thu, 14 Jun 2012 09:36:48 +0900
- From: Darren Cook <darren@example.com>
- Subject: Re: [tlug] Perform an action when network cable unplugged (and back in again): have udev call you
- References: <4FD7DDC0.9090701@dcook.org> <CAAcd6GqmkcHhkLJv=UFaMoHBBJVx5ekpFj0Hrg+C7vsq=jz1pQ@mail.gmail.com> <20120613120015.407df2fd5e958adcae773233@kinali.ch> <4FD88209.6050300@dcook.org> <20120613083801.6cbdec9f.jep200404@columbus.rr.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1
>> Interesting idea... but how do I know if udev gets an event? I think this is still the key question. > Browse the *.rules files /etc/udev/rules.d/ (at least that's > where they are in Centos 5). Thanks for the hints. (On Ubuntu user customizations are there; packages install in /lib/udev/rules.d/) I first changed /etc/udev/udev.conf logging from "err" to "debug" (and "service udev restart"). The I created: 10-darren-test.rules, with this line: ACTION=="add", SUBSYSTEMS=="net", RUN+="/etc/network/darren-testing" (syslog told me it had been recognized and accepted as soon as I saved it; if I save a typo it tells me that too.) That darren-testing file is just a simple logger: #!/bin/bash echo `date` >>/tmp/darren.log But it never gets called when I unplug the network cable (or for anything else so far). So the udev hook is something else (or there isn't one). I also tried: KERNEL=="*", RUN+="/etc/network/darren-testing" which I thought was going to be dangerously hyperactive, but not even a whimper. Darren -- Darren Cook, Software Researcher/Developer http://dcook.org/work/ (About me and my work) http://dcook.org/blogs.html (My blogs and articles)
- References:
- [tlug] Perform an action when network cable unplugged (and back in again)
- From: Darren Cook
- Re: [tlug] Perform an action when network cable unplugged (and back in again)
- From: Jawaad Mahmood
- Re: [tlug] Perform an action when network cable unplugged (and back in again)
- From: Attila Kinali
- Re: [tlug] Perform an action when network cable unplugged (and back in again)
- From: Darren Cook
- Re: [tlug] Perform an action when network cable unplugged (and back in again): have udev call you
- From: jep200404
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Why just two packages unauthenticated
- Next by Date: Re: [tlug] Ubuntu Laptop Assistance Please + Rant about Akihabara
- Previous by thread: Re: [tlug] Perform an action when network cable unplugged (and back in again): have udev call you
- Next by thread: Re: [tlug] Perform an action when network cable unplugged (and back in again)
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links