Do not run readlink for *every* uevent, this should (at most) be done for USB
network devices, so move that test after that.
Also, stop calling readlink at all and just test if
/etc/udev/rules.d/80-net-setup-link.rules exists -- a common way to disable an
udev rule is to just "touch" it in /etc/udev/rule.d/ (i. e. empty file), and if
the rule is customized we cannot really predict anyway if the user wants
MAC-based USB net names or not.
LP: #1615021
On some architectures (at least ppc64el), running resolvconf does not work with
MemoryDenyWriteExecute=yes:
Process: 4728 ExecStartPost=/bin/sh -c [ ! -e /run/resolvconf/enable-updates ] || echo "nameserver 127.0.0.53" | /sbin/resolvconf -a systemd-resolved (code=exited, status=127)
Aug 15 07:16:39 autopkgtest sh[4659]: sed: error while loading shared libraries: cannot restore segment prot after reloc: Operation not permitted
LP: #1609740
This avoids long hangs during shutdown if user services fail/hang due to X.org
going away too early. This is mostly a workaround, so only install for
Ubuntu for now.
We need an "early" session target for things like gnome-keyring, openssh's
ssh-agent, session-migration etc. which all need to start before the main
desktop. These export environment variables to systemd/D-Bus such as
SSH_AUTH_SOCK or update the gsettings database.
This will be upstreamed soon once the structure for graphical systemd sessions
settles down.
Gbp-Dch: Short
Use ConditionPathExists=/dev/tty0, the same check as in getty@.service,
to determine whether we have a functional VC subsystem and we should
start any gettys.
Closes: #824779
Add debian/extra/units/systemd-resolved.service.d/resolvconf.conf to tell
resolvconf about resolved's builtin DNS server on 127.0.0.53. With that, DNS
servers picked up via networkd are respected when using resolvconf, and
software like Chrome that does not do NSS (libnss-resolve) still gets proper
DNS resolution.
Drop the brittle and ugly systemd-networkd-resolvconf-update.{path,service}
hack instead.
The latter does not exist any more when "initscripts" falls out of the default
installation. This now does not do a fixed one-minute wait but uses "Type=idle"
instead. This also becomes a no-op when the CPU supports "intel_pstate" (≤ 5
years old), as on these the ondemand/powersave schedulers are actually
detrimental.
LP: #1584124
LP: #1579278
DNS servers which only apply to particular domains should/must not appear in
/etc/resolv.conf as globl name servers.
Thanks Andy Whitcroft for the initial fix!
Add corresponding test case to debian/tests/networkd.
LP: #1587762
Since upstream commit e33a06a1 "systemctl show" fails for nonexisting units
instead of succeeding with "not-found". Make the code compatible to both for
now.
This will run systemd-sysv-generator, so SysV init scripts that aren't
installed by the package manager should be picked up automatically.
Closes: #825913
The last remaining user of this (ifplugd) got fixed.
Add appropriate versioned Breaks: to ensure that older versions of these three
packages are not being used with this new udev.
This avoids having to install libu2f-host0 (which isn't discoverable at all) to
make those devices work.
Add this to debian/extra/rules/70-debian-uaccess.rules, as we might get similar
rules in the future. This was rejected upstream at
https://github.com/systemd/systemd/issues/102 because in some future this
should move to a proper kernel driver. Keep this downstream until that happens
and Chrome & friends move over to that.
LP: #1387908
Stop doing this for locally administered (i. e. randomly generated) ones. These
devices have no intrinsic stable properties, so use the default location based
names for those.
Drop /lib/systemd/network/90-mac-for-usb.link (as link files don't currently
support globs for MACAddress=) and replace with an udev rule in
/lib/udev/rules.d/73-special-net-names.rules.
Closes: #812575
LP: #1574483
Don't greedily chop off everything before a 0, as that breaks with vio
addresses like "30001002". Instead, just chop off the first four digits (bus
number) and chop off leading zeros (avoids calling sed or other external
programs, and there are at most four of them).
Stop assuming that the bus number always starts with '3', e. g. QEMU defaults
to '7'. Instead, now always just cut off the bus number prefix. This assumes
that we won't get *two* virtual buses with conflicting device numbers, but
having multiple buses has never been observed.
If a device has number 'x000000', name it "ibmveth0" instead of just "ibmveth".
Add missing ' to terminate the sh -c '' command.
Thanks to Adam Conrad!
ibmveth devices' $DEVPATH number usually starts with '3' and is tied to
(virtual) hardware (slot id selected in the HMC), thus this provides a reliable
naming. E. g. "/devices/vio/30000002/net/eth1" gets named "ibmveth2".
LP: #1561096
This is a script to replace the current source with a checkout of an upstream
pull request, branch, or commit, and remove debian/patches/. This also disables
autopkgtests which are not appropriate for testing upstream. Called from
debian/rules if $TEST_UPSTREAM is set.
This will be used for upstream CI.
When a service is masked the native service does not support
reload, so the lsb hooks would then allow fallback on init script
reload function.
Move the check for masked services earlier and bail out with exit 0
so that does not happen.
(Still a bit confusing that there's no output at all to inform
the user calling the init script for a masked service about this,
but I've been told it's on purpose eg. to avoid spamming the logs.)
Closes: #804882
debian/extra/rules/80-debian-compat.rules: Remember which device got the
"cdrw", "dvd", or "dvdrw" symlink to avoid changing links on device events.
Drop the rule for the "cdrom" symlink as that is already created in
60-cdrom_id.rules.
Closes: #774080
This was a race condition which sometimes led to resolvconf not knowing about
the received name server. This now also ensures to update resolvconf if the
name server goes away.
This might be legitimately called several times in quick succession.
If that part of the "networkd" autopkgtest fails, show the journal log for that
service for easier debugging.
We don't want to stop these units during shutdown. Stopping networking.service
already shuts down the interfaces, but contains the safeguard for NFS or other
network file systems. Isolating emergency.target still keeps working as before
as well, as this also stops networking.service.
Closes: #761909
LP: #1492546