I finally got bothered enough to fix the /etc/network/interfaces problem on my Ubuntu notebook. The problem is that when my neo got connected, I want to do some automatic setup. On Debian lenny, it’s quite easy:
1 | allow-hotplug usb0 |
But on Ubuntu gutsy it doesn’t work. I have to replace “allow-hotplug” by “auto”. Even if I changed that, it will only work for the first time you plugged the device. That’s because of a bug listed here. The solution is to remove the DRIVER="?*"
in /etc/udev/rules.d/85-ifupdown.rules
.
Now, finally, if works even after multiple plug/unplug. However, there is still one problem left: “auto usb0” basically means the system will try to bring up the device during booting. It works for “lo”, the local loopback network interface because it’s always there. But the usb0 won’t be there everytime we boot. That causes some error messages. My solution is to modify /etc/udev/rules.d/85-ifupdown.rules again, replace “auto” by “hotplug”, and use “allow-hotplug usb0” in my /etc/network/interfaces . The final 85-ifupdown.rules looks like this:
1 | # This file causes network devices to be brought up or down as a result |
Some further digging shows the difference between debian lenny and ubuntu gutsy in the handling of the “interfaces” file. On Debian:
1 | john@buddha:/etc/udev/rules.d$ grep net.agent * |
so it runs net.agent
, a script under /lib/udev/
to bring up the interfaces. On Ubuntu, this is simply the job of the 85-ifupdown.rules
above.