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.
This commit is contained in:
Antonio Alvarez Feijoo
2026-02-03 08:18:41 +09:00
committed by Yu Watanabe
parent c27d1b3eec
commit 2f76b10b94
+4 -2
View File
@@ -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))