I'm using Ubuntu 12.04 LTS, but I need to run the following command:
sudo dhclient
after startup to acquire a stable ethernet connection. I am running dhclient during startup already, through the /etc/rc.local file.
Someone please help me run this command after-startup automatically (by removing it's requirement for root, or some other means), or suggest a different way of troubleshooting my ethernet connection.
One workaround would be to use rc.local with a sleep command. Put the following into /etc/rc.local:
This will make the command wait for 60 seconds before being executed, which should allow enough time for your machine to finish booting.
You can create a Custom script to start or stop services and make it executable at startup, i don't have experience in writing codes so please refer this official Guide look up Installing custom init-scripts