ademaria/ubuntu-ec2net — pull request #3 by jcoleman (2014-08-15 16:13:21+00:00)
Title: Finish porting script: shouldn't attempt action until after networking is up

The script relies on having networking available to access the instance metadata service, and so the script can't run until networking is up. The original AWS script (in Amazon Linux) exits the hot plug script early if init hasn't finished or the networking service isn't up yet. That part of the script was commented out in this port, but not having it causes instances to (sometimes, because of a race condition I assume) fail to bring up the loopback interface if this script is installed prior to boot (e.g., in a baked AMI.)

I've updated the script to exit early if eth0 isn't up yet to solve this issue.