mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
Both sysext and confext used the host's /etc/initrd-release file even when --root=/somewhere was specified. A workaround was the SYSTEMD_IN_INITRD= env var but without knowing this it was quite confusing. Aside from users validating their extensions, the primary use case for this to matter is when the extensions are set up from the initrd where the initrd-release file is present when running but we want to prepare the extensions for the final system and thus should match for the right scope. Make systemd-sysext check for /etc/initrd-release inside the given --root= tree. An alternative would be to always ignore the initrd-release check when --root= is passed but this way it is more consistent. The image policy logic for EFI-loader-passed extensions won't take effect when --root= is used, though.