mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 23:21:22 +03:00
initrd: fix systemd.debug-shell & friends
They would get assigned to an inactive target in the initramfs.
This commit is contained in:
parent
2b1daf24dc
commit
23e5e79a51
@ -126,7 +126,15 @@ static int generate_wants_symlinks(void) {
|
||||
|
||||
STRV_FOREACH(u, arg_wants) {
|
||||
_cleanup_free_ char *p = NULL, *f = NULL;
|
||||
const char *target = arg_default_unit ?: SPECIAL_DEFAULT_TARGET;
|
||||
const char *target;
|
||||
|
||||
/* This should match what do_queue_default_job() in core/main.c does. */
|
||||
if (arg_default_unit)
|
||||
target = arg_default_unit;
|
||||
else if (in_initrd())
|
||||
target = SPECIAL_INITRD_TARGET;
|
||||
else
|
||||
target = SPECIAL_DEFAULT_TARGET;
|
||||
|
||||
p = strjoin(arg_dest, "/", target, ".wants/", *u);
|
||||
if (!p)
|
||||
|
Loading…
Reference in New Issue
Block a user