I have succeeded in getting a Netgear WG111T to connect to my WiFi router using WPA, much to my surprise

. (using Standard 5.8, ndiswrapper, Vista drivers).
What works is this :
Ifplugd brings up the wlan0 interface, then
iwconfig wlan0 essid "myrouter"
Wait for the ssid association to happen, then
wpa_supplicant -Dwext -i wlan0 -c/etc/wpa_supplicant.conf
Wait a bit, then
dhcpcd wlan0
I am now ready to put this into rc.local, so as to automate it.
Question is - how do I configure the delays ?
Better question - can I avoid hard-coded delays by getting stage 2 to trigger on completion of stage 1 ?