Skip to content

Commit 5f95035

Browse files
Kabuki94claude
andcommitted
suppress WSL2-incompatible units; fix D-Bus race before logind
Add ConditionVirtualization=!wsl drop-ins for units that fail or are irrelevant in the WSL2 overlayfs environment: stratisd - no Stratis block devices in WSL2 systemd-homed - no LUKS home dirs in WSL2 var-lib-nfs-rpc_pipefs.mount - no NFS stack in WSL2 coreos-ignition-firstboot-complete - no /boot partition, cascades to greenboot-healthcheck, zincati, rpm-ostree-fix-shadow-mode, and boot-complete.target NetworkManager-wait-online - WSL2 networking bypass (was timeout-only) Fix systemd-logind retry loop: dbus-daemon-wsl.service lacked Before=systemd-logind.service, causing logind to connect to D-Bus before the WSL2 fallback daemon was listening. Adding Before= ensures the correct startup ordering on WSL2 without affecting other platforms (the unit's ConditionVirtualization=wsl keeps it inactive elsewhere). Add *.mount.d/ and *.target.d/ glob patterns to .gitignore whitelist alongside the existing *.service.d/ and *.socket.d/ patterns. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8611c33 commit 5f95035

10 files changed

Lines changed: 24 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,10 @@ usr/lib/systemd/system/*
250250
!/usr/lib/systemd/system/*.service.d/**
251251
!/usr/lib/systemd/system/*.socket.d/
252252
!/usr/lib/systemd/system/*.socket.d/**
253+
!/usr/lib/systemd/system/*.mount.d/
254+
!/usr/lib/systemd/system/*.mount.d/**
255+
!/usr/lib/systemd/system/*.target.d/
256+
!/usr/lib/systemd/system/*.target.d/**
253257
# Exclude system-owned service.d dirs that MiOS doesn't manage
254258
usr/lib/systemd/system/systemd-udev-trigger.service.d/
255259
usr/lib/systemd/system/user@.service.d/
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
[Unit]
2+
# WSL2 uses its own networking bridge — NM wait-online never completes
3+
ConditionVirtualization=!wsl
4+
15
[Service]
26
TimeoutStartSec=10
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[Unit]
2+
# No Ignition provisioning in WSL2; /dev/disk/by-label/boot doesn't exist
3+
ConditionVirtualization=!wsl

usr/lib/systemd/system/dbus-daemon-wsl.service

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Documentation=man:dbus-daemon(1)
44
ConditionVirtualization=wsl
55
Requires=dbus.socket
66
After=dbus.socket
7+
Before=systemd-logind.service
78
DefaultDependencies=no
89

910
[Service]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Unit]
2+
ConditionVirtualization=!wsl
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Unit]
2+
ConditionVirtualization=!wsl
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Unit]
2+
ConditionVirtualization=!wsl
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Unit]
2+
ConditionVirtualization=!wsl
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Unit]
2+
ConditionVirtualization=!wsl
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Unit]
2+
ConditionVirtualization=!wsl

0 commit comments

Comments
 (0)