I want to enable wake-on-lan for my network cards, for always. The community guide recommends adding the relevant command to /etc/network/interfaces
. In past experiences editing Ubuntu conf files, it's extremely likely that the network interface file is written anew every boot, if not every apt upgrade. What's the best way to ensure that wake-on-lan is enabled every boot?
Ubuntu – How to enable wake-on-lan permanently
networkingwakeonlan
Best Answer
A boot script run after the network cards are configured should do the trick. Ubuntu uses upstart. After reading about upstart jobs, ethtool, writing an upstart script, and searching the interwebs for a better solution, I came up with this from jevinskie (you'll want to put this in a file in
/etc/init
):Requires ethtool, so make sure it's installed first:
If you want to imbue just one nic with the power of awakening, something like this is more appropriate: