Commit 18b2d121 authored by intrigeri's avatar intrigeri

tails-unblock-network: skip most graphics-related devices when triggering udev

On #17199 (and possibly #17228) I've seen breakage that seems to be caused by
udevadm trigger: the Greeter starts just fine, but on login, systemd-logind is
confused about the state of FDs (for /dev/dri/card{0,1}) it passes to X.Org:
when amnesia's X.Org starts, it gets passed paused FDs which makes it abort.
I suspect that's because at least one of /dev/dri/card{0,1} seem to briefly
disappear and come back again when we run udevadm trigger.

So let's try to avoid replaying kernel events for graphics-related devices.
parent 8ab9174f
......@@ -45,9 +45,17 @@ echo "systemd-udevd has reloaded its databases." >&2
# Now we'll load any present network device previously blocked by
# the blacklist. In particular, the MAC spoofing udev rule should trigger
# for each network device added.
echo "Restarting systemd-udev-trigger.service..." >&2
systemctl restart systemd-udev-trigger.service
echo "systemd-udev-trigger.service restarted." >&2
echo "Replaying udev events..." >&2
udevadm trigger --type=subsystems --action=add \
--subsystem-nomatch=backlight \
--subsystem-nomatch='drm*' \
udevadm trigger --type=devices --action=add \
--attr-nomatch=class=0x030000 \
--subsystem-nomatch=backlight \
--subsystem-nomatch='drm*' \
echo "replayed udev events." >&2
# Block until all triggers have been run. NetworkManager is started immediately
# after, and without the blocking behaviour there's a race between NM
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment