udev 226 introduced predictable interface names for virtio
(https://github.com/systemd/systemd/pull/1119). Create
/etc/systemd/network/50-virtio-kernel-names.link on upgrade to disable this, to
avoid changing e. g. "eth0" to "ens3" in QEMU instances and similar
environments.
Closes: #799034
This is a suid root program, and while it can only be called from networkd,
let's be paranoid and set up a defined environment.
Add some environment variables which ifupdown sets and which scripts might
expect: $LOGICAL, $METHOD, $ADDRFAM, $MODE, and $PHASE.
Drop setting $ADDRFAM from networkd-link.c.
Drop networkd-if-up.d@.service and its invocation from net.agent again. It does
not work when restarting networkd and requires too much overhead.
Instead, add a suid root helper systemd-networkd-dispatcher which calls
run-parts, and patch networkd to run the wrapper at the appropriate time.
Add reference to LP: #1492129.
debian-fixup.service just has one purpose now (make /etc/mtab a symlink), so
drop the debian/extra/debian-fixup shell script and put the ln command directly
into debian-fixup.service. Update the description.
- Fix scheduled shutdown to not shut down immediately. (Closes: #797763)
- Fix description of CPE_NAME in os-release(5). (Closes: #797768)
Adjust patches to new upstream release.
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.
As systemd is the default init now, replace the documentation how to switch to
systemd with how to switch back (temporarily or permanently) to SysV init. Also
move that paragraph to the bottom as it's now less important.
The vesafb module has been compiled into the kernel in both Debian and Ubuntu
for a fair while, this never had a systemd equivalent, and Debian never shipped
the accompanying rules for determining $PRIMARY_DEVICE_FOR_DISPLAY.
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
rc-local.service acts as an ordering barrier even if its condition is
false, because conditions are evaluated when the service is about to be
started, not when it is enqueued. We don't want this ordering barrier on
systems that don't need/use /etc/rc.local.
See also:
1567308317https://github.com/systemd/systemd/pull/268
Otherwise ./configure might enable them automatically if the build
dependencies are installed and "dh_install --fail-missing" will then
fail due to uninstalled files.
Also remove the creation of the systemd-journal-remote group from
systemd.postinst. This is no longer needed as the tmpfiles snippet
requiring that group is now shipped by the systemd-journal-remote
package.