Redhat's Crap Network Init Script
So why did my RHAL v5.2 end up with messed up network routing after a reboot?
Eventually found, that in /etc/init.d/network we have
interfaces=$(ls ifcfg* | \ LANG=C sed -e "$__sed_discard_ignored_files" \ -e '/\(ifcfg-lo\|:\|ifcfg-.*-range\)/d' \ -e '/ifcfg-[A-Za-z0-9\._-]\+$/ { s/^ifcfg-//g;s/[0-9]/ &/}' | \ LANG=C sort -k 1,1 -k 2n | \ LANG=C sed 's/ //')which is complete garbage. On my machine it gives
eth0 eth0-old eth1 eth2 eth3 eth3-oldand promptly runs all of ifcfg-eth0, ifcfg-eth0-old, ifcfg-eth3 and ifcfg-eth3-old — how bollox is that?