udev rule can fail to run ifdown, break reinserting device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ifupdown (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
Binary package hint: ifupdown
Package: ifupdown
Version: 0.6.8ubuntu6
Severity: normal
Tags: patch
In the /etc/udev/
rule is, like the add one, conditionalised under
SUBSYSTEM=="net" and DRIVERS=="?*". Unfortunately,
on my system (cdc usb ether driver, connecting to openmoko phone)
the DRIVERS variable isn't set at all when the device is unplugged.
This causes ifdown to fail to be run on device removal, which prevents
the device working next time it is plugged in, since ifup doesn't
do anything when the interface is already up.
Fix: Move the remove line to the end of the file, and insert conditional
subsystem.
SUBSYSTEM=="net", ACTION=="remove", RUN+="/
-- System Information:
Debian Release: 4.0
APT prefers feisty-security
APT policy: (500, 'feisty-security'), (500, 'feisty')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/dash
Kernel: Linux 2.6.20-16-generic
Locale: LANG=en_GB.UTF-8, LC_CTYPE=
Versions of packages ifupdown depends on:
ii cdebconf [debconf-2.0] 0.111ubuntu2 Debian Configuration Management Sy
ii debconf [debconf-2.0] 1.5.13ubuntu1 Debian configuration management sy
ii libc6 2.5-0ubuntu14 GNU C Library: Shared libraries
ii lsb-base 3.1-22ubuntu3 Linux Standard Base 3.1 init scrip
ii net-tools 1.60-17ubuntu1 The NET-3 networking toolkit
ifupdown recommends no packages.
-- debconf information:
ifupdown/
ifupdown/
I can confirm this on my hardware, a Netgear WG111v2, using the rtl8187 driver.
My workaround was just to remove "DRIVERS=?*", since I didn't see how a network device could appear without a driver anyway. I'd say the real bug is either in udev or the kernel not providing this information.
An obvious reason to be interested in the driver would be to remove the kernel module when the last device supported by it is removed.