Comment 7 for bug 431255

Revision history for this message
Scott Moser (smoser) wrote :

I've tested this with a private build by:

$ cat my.userdata
#!/bin/sh
SLEEPTIME=300
echo "I Am Sleeping [$SLEEPTIME]" | logger -s -t "smoser-sleeps"
sleep ${SLEEPTIME}
echo "I Am Awake [$SLEEPTIME later]" | logger -s -t "smoser-sleeps"

$ xc2-run-instances ami-fa658593 --user-data-file my.userdata

# now verify that this takes a long time before i can ssh to it, and i get connect refused
# once its up, I ssh there and :
% sudo dpkg -i ec2-init_0.4.999-0ubuntu3_all.deb
% sudo rm /var/lib/ec2/*
% sudo reboot

The rm above cause ec2-init to think it needs to run again. It regenerates keys (and ssh warns me), and then runs the long sleep. This time, though ssh comes up quickly, and i have the 300 seconds to ssh in and watch the 'sleep 300' process.