Commit Graph

6 Commits

Author SHA1 Message Date
Martin Pitt
d67efc7cea debian/tests/networkd: Check that /etc/resolv.conf gets the DHCP's nameserver
Only do the check if it is a symlink, i. e. dynamically managed by
systemd-resolved or resolvconf.
2015-09-09 14:40:00 +02:00
Martin Pitt
bab3f8d39e net.agent: Only call networkd-if-up.d@.service when networkd is actually enabled or running
This avoids starting these units in vain if networkd is not being used. Note
that we can't just use "is-active", as these rules might already get triggered
at boot when networkd is not running yet.
2015-09-08 08:52:27 +02:00
Martin Pitt
27f7cc9f9f Make networkd call if-up.d/ scripts when it brings up interfaces
With this, networkd becomes compatible with ifupdown and NetworkManager for
packages shipping hooks.

 - Add debian/extra/units/networkd-if-up.d@.service: Wait for a particular
   interface to be up, and call if-up.d/ for it if it is managed by
   networkd. Correspondingly, call if-post-down.d/ scripts when stopping.
 - debian/extra/udev-helpers/net.agent: Start/stop
   networkd-if-up.d@.service when interfaces appear/go away.
 - debian/tests/networkd: Verify that if-up.d/ and if-post-down.d/ scripts
   get run for a networkd managed interface.

Note that if-pre-up.d/ and if-down.d/ scripts are *not* being called + (like
NetworkManager), as they are unnecessary (if-pre-up.d) and unreliable
(if-down.d).

See Ubuntu blueprint for details:
https://blueprints.launchpad.net/ubuntu/+spec/foundations-w-networkd-vs-ifupdown
2015-09-03 16:18:05 +02:00
Martin Pitt
4801c2a5ba debian/tests/networkd: Add hotplug tests 2015-09-03 12:02:43 +02:00
Martin Pitt
ed80dff0bb networkd autopkgtest: More robust/forceful killing of dnsmasq 2015-07-26 14:57:38 +02:00
Martin Pitt
961dd059d2 Add "networkd" autopkgtest
This covers basic DHCP on IPv4 and IPv4+6 on a veth device for now.
2015-07-13 13:28:26 +02:00