Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 367151 - sys-apps/ifplugd - After baselayout upgrade, no longer brings down interfaces properly
Summary: sys-apps/ifplugd - After baselayout upgrade, no longer brings down interfaces...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-13 23:18 UTC by Antti Mäkelä
Modified: 2011-05-21 12:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Mäkelä 2011-05-13 23:18:12 UTC
After the recent upgrade to new baselayout, I've noticed that ifplugd does not seem to bring down interfaces properly. As an effect, I'm stuck with e.g. default routes and such things which wreak havoc if I take out LAN cable and switch to wireless (the not connected LAN connection is still preferred over wireless).

Steps to repeat: 

1. Have wire connected
2. Observe routing information
3. Pull cable out
4. Observe that default route has not vanished.

# rc-status | grep lan
 net.lan                                                           [  started  ]
# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.22.22.0     0.0.0.0         255.255.255.0   U     10     0        0 lan
127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo
0.0.0.0         172.22.22.1     0.0.0.0         UG    10     0        0 lan
# ifconfig lan
lan       Link encap:Ethernet  HWaddr f0:de:f1:0b:ba:a7  
          inet addr:172.22.22.3  Bcast:172.22.22.255  Mask:255.255.255.0
          inet6 addr: fe80::f2de:f1ff:fe0b:baa7/64 Scope:Link
-->       UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3861166 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6467474 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1171151907 (1.0 GiB)  TX bytes:8670367532 (8.0 GiB)
          Interrupt:20 Memory:f2600000-f2620000 

<Yank cable here, notice how "RUNNING" disappears>

# ifconfig lan
lan       Link encap:Ethernet  HWaddr f0:de:f1:0b:ba:a7  
          inet addr:172.22.22.3  Bcast:172.22.22.255  Mask:255.255.255.0
          inet6 addr: fe80::f2de:f1ff:fe0b:baa7/64 Scope:Link
-->       UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:3861166 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6467474 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1171151907 (1.0 GiB)  TX bytes:8670367532 (8.0 GiB)
          Interrupt:20 Memory:f2600000-f2620000 

Route still present and service still up:

# rc-status | grep lan
 net.lan                                                           [  started  ]

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.22.22.0     0.0.0.0         255.255.255.0   U     10     0        0 lan
127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo
0.0.0.0         172.22.22.1     0.0.0.0         UG    10     0        0 lan

Ifplugd is version 0.28-r9.
Dhcpcd is version 5.2.12.
Baselayout is version 2.0.2.
OpenRC is version 0.8.2-r1.
Comment 1 Antti Mäkelä 2011-05-13 23:24:45 UTC
/var/log/messages show:

ifplugd(lan)[22866]: Executing '/etc/ifplugd/ifplugd.action lan down'.
/etc/init.d/net.lan[31615]: ERROR: net.lan failed to stop
ifplugd(lan)[22866]: client:  * ERROR: net.lan failed to stop

Apparently, this was caused my existing predown()-function that worked fine in baselayout-1. I have this, since I only want to use netmount and sshd on wired connection and not have them activate when I'm on some random wireless AP. So I'm stopping them here.

predown() {
   if [[ ${IFACE} == "lan" ]] ; then
      /etc/init.d/netmount stop
      /etc/init.d/sshd stop
   fi
}

However, not seeing why this would cause a failure, and like I said, it worked fine in baselayout-1.
Comment 2 Antti Mäkelä 2011-05-21 12:57:59 UTC
Looks like this was all about postup() stuff.