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][tlug] Perform an action when network cable unplugged (and back in again)
- Date: Wed, 13 Jun 2012 09:24:32 +0900
- From: Darren Cook <darren@example.com>
- Subject: [tlug] Perform an action when network cable unplugged (and back in again)
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1
My notebook, running ubuntu 10.04, is almost all the time using a wired connection, with static IP address. When I pull the network cable out of my notebook (and then plug it in again) I see these entries in /etc/syslog: Jun 12 09:04:45 myhost kernel: [479179.526691] r8169: eth0: link down ... Jun 12 09:08:40 myhost kernel: [479414.948768] r8169: eth0: link up What I'd like to do is run a command when we get link down (I'd like to unmount a network drive), and run another command when we get link up (remount the drive). Are there any hooks in linux for this? (I know we have if-up.d and if-down.d for the interfaces, but those scripts are not being run when just the cable is pulled out; I'm looking for the "link" equivalent of those directories.) Does such a thing even exist? Thanks, Darren -- Darren Cook, Software Researcher/Developer http://dcook.org/work/ (About me and my work) http://dcook.org/blogs.html (My blogs and articles)
- Follow-Ups:
- 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: Nguyễn Vũ Hưng
- [tlug] Perform an action when network cable unplugged (and back in again)
- From: Stephen J. Turnbull
- [tlug] Perform an action when network cable unplugged (and back in again)
- From: Stephen J. Turnbull
- Re: [tlug] Perform an action when network cable unplugged (and back in again)
- From: Keith Bawden
Home | Main Index | Thread Index
- Prev by Date: [tlug] -reminder- [announcement] nomikai June 15 (Friday)
- Next by Date: Re: [tlug] Perform an action when network cable unplugged (and back in again)
- Previous by thread: [tlug] -reminder- [announcement] nomikai June 15 (Friday)
- 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