I have the following script on my Kubuntu 5.10 box:
sudo iwconfig eth1 enc <munged> essid driveon
sudo ifconfig eth1 up
sudo dhclient eth1
When I run it as a normal user in my home directory, it works: the network card comes up, gets an IP and I'm groovy.
However, using the same script in the startup rc* directories fails. To put it in the start up scripts I copied the script into /etc/init.d and ran update-rc.d eth1 defaults (the script is called eth1).
I've also tried it without the 'sudo' bits of each line.
Any ideas why it works when run manually, but not as a startup script?