OK, I should have looked more closely at the init scripts before. It turns out that lo is brought up by S08loopback in /etc/rcS.d before udev is started. So testing whether lo is up doesn't do much good.
I have come up with a temporary workaround though. I modified /etc/init.d/networking to touch a file (/var/run/network/started) when networking is started (or restarted), and remove it when networking is stopped. I also changed my udev ifup script to test for this file to determine whether to bring up the interface. It's a horrible hack, and I hope someone can come up with a better solution soon, but for now it works at least.
OK, I should have looked more closely at the init scripts before. It turns out that lo is brought up by S08loopback in /etc/rcS.d before udev is started. So testing whether lo is up doesn't do much good.
I have come up with a temporary workaround though. I modified /etc/init. d/networking to touch a file (/var/run/ network/ started) when networking is started (or restarted), and remove it when networking is stopped. I also changed my udev ifup script to test for this file to determine whether to bring up the interface. It's a horrible hack, and I hope someone can come up with a better solution soon, but for now it works at least.