Comment 81 for bug 1301015

Gabriel Parrondo (v-sistemas) wrote :

Seriously people, get over yourself. Here's what the init script did on restart:

  ifdown -a --exclude=lo $verbose
  ifup -a --exclude=lo $exclusions $verbose && ifup_hotplug $exclusions $verbose

All the rest is message output, checking for /etc/network/options and other boilerplate stuff. That's exactly the same suggestion feliperechia made in #8 about 2 years ago.

"Oh, but he didn't mention ifup_hotplug or $exclusions yadda yadda"

Well, ifup_hotplug actually extracts a list of interfaces from the output of `ifquery --list --allow=hotplug`, checks they're physical interfaces and have physical link, and runs ifup for all of them.

I sincerely doubt any of the "oh I screwed up and now have to take a 4 hour flight to the datacenter" are hotplugging their network interfaces. If your NIC is available on boot it should be set to 'auto' and will be picked up by `ifup -a`. No need for ifup_hotplug on headless servers.

$exclusions is the EXCLUDE_INTERFACES parameter from /etc/default/networking. $verbose is either '-v' or empty. You probably don't use either.

So yeah, `( ifdown -a --exclude=lo; ifup -a --exclude=lo) &` should work for everyone because that's exactly what `/etc/init.d/networking restart` did.

Can we move along now? Thanks!