From 2f76b10b94c053cedd4fe1b28983993eaa498403 Mon Sep 17 00:00:00 2001 From: Antonio Alvarez Feijoo Date: Mon, 2 Feb 2026 15:09:40 +0100 Subject: [PATCH] import-generator: fix sysext/confext ordering in initrd In the initrd, order the generated `systemd-import@.service` units before the initrd-specific sysext/confext units. --- src/import/import-generator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/import/import-generator.c b/src/import/import-generator.c index cdb1914604c..f5c39774050 100644 --- a/src/import/import-generator.c +++ b/src/import/import-generator.c @@ -357,9 +357,11 @@ static int transfer_generate(const Transfer *t) { arg_failure_action); if (t->class == IMAGE_SYSEXT) - fputs("Before=systemd-sysext.service\n", f); + fprintf(f, "Before=systemd-sysext%s.service\n", + in_initrd() ? "-initrd" : ""); else if (t->class == IMAGE_CONFEXT) - fputs("Before=systemd-confext.service\n", f); + fprintf(f, "Before=systemd-confext%s.service\n", + in_initrd() ? "-initrd" : ""); /* Assume network resource unless URL is file:// */ if (!file_url_is_valid(t->remote)) -- 2.47.3