BTW I checked the usual container checks and we have:
$ systemd-detect-virt
wsl
$ systemd-detect-virt --container
wsl
$ echo $?
0
So those could be used here instead of the old test that doesn't catch WSL (and probably other containers).
Or to avoid that there might be containers that support this we can make the register call "ok to fail".
But that might hide issues on other environments.
Maybe "ok to fail" if in container ...
I'd need to check the old discussions adding the non-working container check for more details.
BTW I checked the usual container checks and we have:
$ systemd-detect-virt
wsl
$ systemd-detect-virt --container
wsl
$ echo $?
0
So those could be used here instead of the old test that doesn't catch WSL (and probably other containers).
Or to avoid that there might be containers that support this we can make the register call "ok to fail".
But that might hide issues on other environments.
Maybe "ok to fail" if in container ...
I'd need to check the old discussions adding the non-working container check for more details.