Public bug reported:
Binary package hint: ifupdown
DESCRIPTION:
The script /etc/udev/rules.d/85-ifupdown.rules does not allow udev to invoke
ifdown when a network PCMCIA card is removed. On subsequent reinsertion of the
card, ifup refuses to run because it thinks that the status is still 'UP'.
CAUSE:
the check DRIVERS=="?*" allows the 'add' part to be executed, but causes the
'remove' part to be skipped
STEPS TO REPRODUCE:
1) insert the pcmcia card (first time it initializes properly)
2) remove (will not invoke ifdown and will leave a dhclient around)
3) insert again (will not invoke the pre-up or anything else)
ENVIRONMENT:
Ubuntu 7.04
ifupdown 0.6.8ubuntu6
linux-image-2.6.20-16-generic 2.6.20-16.29
udev 108-0ubuntu4
cat /etc/network/interfaces
-------------------------------------------------------------
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
auto eth0
iface eth0 inet dhcp
pre-up ifconfig eth0 down
pre-up iwconfig eth0 essid XXXXXXXXXXXXX
pre-up iwconfig eth0 mode managed
pre-up iwconfig eth0 channel auto || true
pre-up ifconfig eth0 up
-------------------------------------------------------------
Original /etc/udev/rules.d/85-ifupdown.rules:
-------------------------------------------------------------
# This file causes network devices to be brought up or down as a result
# of hardware being added or removed, including that which isn't ordinarily
# removable.
# See udev(7) for syntax.
SUBSYSTEM=="net", DRIVERS=="?*", GOTO="net_start"
GOTO="net_end"
LABEL="net_start"
# Bring devices up and down only if they're marked auto.
# Use start-stop-daemon so we don't wait on dhcp
ACTION=="add", RUN+="/sbin/start-stop-daemon --start --background
--pidfile /var/run/network/bogus --startas /sbin/ifup -- --allow auto
$env{INTERFACE}"
ACTION=="remove", RUN+="/sbin/start-stop-daemon --start --background
--pidfile /var/run/network/bogus --startas /sbin/ifdown -- --allow auto
$env{INTERFACE}"
LABEL="net_end"
-------------------------------------------------------------
Modified /etc/udev/rules.d/85-ifupdown.rules:
-------------------------------------------------------------
# This file causes network devices to be brought up or down as a result
# of hardware being added or removed, including that which isn't ordinarily
# removable.
# See udev(7) for syntax.
#RUN+="/bin/bash -c '(echo id=$id action=$env{ACTION}
)>>/var/log/ifupdown'"
SUBSYSTEM!="net", GOTO="net_end"
# Bring devices up and down only if they're marked auto.
# Use start-stop-daemon so we don't wait on dhcp
ACTION=="remove", RUN+="/sbin/start-stop-daemon --start --background --pidfile
/var/run/network/bogus --startas /sbin/ifdown -- --allow auto $env{INTERFACE}"
DRIVERS=="?*", GOTO="net_add"
GOTO="net_end"
LABEL="net_add"
ACTION=="add", RUN+="/sbin/start-stop-daemon --start --background --pidfile
/var/run/network/bogus --startas /sbin/ifup -- --allow auto $env{INTERFACE}"
LABEL="net_end"
-------------------------------------------------------------
** Affects: ifupdown (Ubuntu)
Importance: Undecided
Status: New
--
[feisty] ifdown not invoked when removing pcmcia wireless card
https://bugs.launchpad.net/bugs/124499
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs