When I started using 13.04 LTS on my Virtualbox VM (4.3.26), I turned off network manager and wrote some scripts for dynamically updating the static IP of my laptop on any network. I was doing this so I could take my development environment with me; I store the settings in a git branch creating a new one with different settings for every network I arrive at for example if I was at tom's house I would run:

$ git checkout tomsHouse
$ sudo ./updateConfiguration.sh

or if I was at Starbucks I would run:

$ git checkout starbucks
$ sudo ./updateConfiguration.sh

The configuration that is loaded is a variant on the following:

# Copy the configuration files out to their respective locations...
sudo cp ./dnsmasq.conf /etc/dnsmasq.conf
sudo cp ./interfaces /etc/network/interfaces

# Restart networking
sudo /etc/init.d/networking stop
sudo /etc/init.d/networking start

# Restart the dnsmasq service
sudo /etc/init.d/dnsmasq stop
sudo /etc/init.d/dnsmasq start

# Restart Lampp
sudo /opt/lampp/lampp_stop
sudo /opt/lampp/lampp_start

./updateConfiguration.sh - Run this to set the new configuration...the rest are just configuration files...

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static


and of course the dnsmasq.conf file just updates the rest of the configurations to point to whatever static IP address interfaces points to.

When I upgraded to 14.04 LTS my network switching scripts stopped working, I'm forced to reboot to enabled the changes, whereas before in 13.04 I could just run the script and everything would work again.

Has anything changed in 14.04 that might prevent this from working correctly?

  • 1
    If you are using sudo to invoke updateConfigurations you don't need to put sudo in every line there. Could it be that network-manager is now controlling your network?. Try to restart it too. Apr 28, 2015 at 6:28
  • How to get rid of network manager: askubuntu.com/questions/249944/…
    – leeand00
    Apr 28, 2015 at 12:16


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.