ifplugd intergration

ifplugd is similar to netplug. A few days ago, I wrote a netplug module for baselayout. Writing one for ifplugd was a little more tricky as I had to alter the ifplugd init script a fair bit so they don’t conflict with each other. Luckily, with a few recent baselayout enchancements we can now work out which init scripts launched which daemons via start-stop-daemon calls :) To make things more consistent with other baselayout modules, you have to specify the exact options you want over the defaults like so ifplugd_eth0="--api-mode=wlan"
Read full post

arpinginginginging

After being inspired by a forum post, I wrote a new net-scripts module (arping) which replaces the apipa module. arping also does apipa, so you loose nothing if you ever used it. apipa was basically a wrapper around the arping tools to find a free address in the 169.254.0.0/16 range, so the new module name makes more sense. Anyway, here’s a sample config which tries to find a gateway and sets up the interface for it
Read full post

netplug

netplug is a nice little daemon that detects ethernet cables being inserted and removed based on kernel netlink events. Unlike ifplugd, it doesn’t use any other tricks or work with wireless devices. However, it is much smaller and encourages kernel driver devs to use netlink events properly- which is good :) One thing I’ve never liked about ifplugd is that it never seems to work well with the default settings and it currently runs from it’s own init script- which makes it hard to integrate into baselayout automatically.
Read full post

Merging resolv.conf

baselayout-1.12.0_pre6 will now feature resolv.conf merging- basically taking the best information from active interfaces that we or dhcp has setup and merging it into one. For example eth0 has nameserver 1.2.3.4 nameserver 1.2.3.5 domain foo eth1 has nameserver 4.3.2.1 nameserver 4.3.2.2 search wibble wobble This turns into a merged resolv.conf of nameserver 1.2.3.4 nameserver 4.3.2.1 nameserver 1.2.3.5 search foo wibble wobble However, if eth1 has a lower metric than eth0 (eth0 wireless, eth1 wired for example) then it becomes
Read full post

toposort to save the day

baselayout-1.12.0_pre4 hit portage today. The trace_dependencies() function in /lib/rcscripts/sh/rc-services.sh has caused a few headaches for many people. Symptoms include hanging, getting things in the wrong order and other such nasty voodoo. :O So I hacked in a toposort function which is faster then the “sort until nothing” approach we used previously. We can’t use tsort (C toposort program) as that’s in /usr/bin and isn’t available at boot time, so it’s in bash!
Read full post