this bug is about net.modules.d/ifconfig:ifconfig_del_addresses() the ifconfig module rips off ip addresses by running `ifconfig ${iface} 0` ... on a glibc system, the 0 is extended properly to all 4 bytes, but on uclibc systems, our inet_aton() func is a little cheap (cheap is good, means it's smaller :D), and doesnt handle the semi-undocumented 'extend this address' feature. what this means is that any address not in the 'a.b.c.d' form is considered invalid :(. on my uclibc system, this caused `reboot` to get stuck in a loop: <snip> 0: Unknown host ifconfig: `--help' gives usage information. 0: Unknown host ifconfig: `--help' gives usage information. 0: Unknown host ifconfig: `--help' gives usage information. 0: Unknown host ifconfig: `--help' gives usage information. 0: Unknown host ifconfig: `--help' gives usage information. <snip> running `ifconfig ${iface} 0.0.0.0` works for both glibc and uclibc systems getting back to this loop ... recoding it like this will protect against future errors (whatever they be), and will save pointless forks: - while ifconfig ${iface} | grep -q -m1 -o 'inet addr:[^ ]*' ; do + local addrcnt=$(ifconfig eth3 | grep -c -o 'inet addr:[^ ]*') + while ((addrcnt--)) ; do
Why eth3 ?
a typo, should be ${iface} eth3 was the interface i was testing with on my machine
We can't use that loop as ifconfig does not report all addresses added by iproute2 - and we need to erase them all. However, the ifconfig ${iface} 0.0.0.0 code is fine :) Fixed in CVS - will be in baselayout-1.11.9
Fixed by baselayout-1.11.9