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
#configure for dhcp, then arping config_eth0=( "dhcp" ) fallback_eth0=( "arping" ) # List gateways to arping arping_eth0="192.168.1.1 10.1.1.1" # Map found gateways to config's config_192168001001=( "192.168.1.240/24" ) fallback_192168001001=( "apipa" ) routes_192168001001=( "default via 192.168.1.1" ) config_010000000001=( "10.0.0.254/8" ) fallback_010000000001=( "apipa" ) routes_010000000001=( "default via 10.0.0.1" )
Those that want to try it out, can grab it from here. Drop it into /lib/rcscripts/net.modules.d and delete the apipa module that 's currently there. Requires baselayout-1.12.0_pre8 (will ship with pre9).