8d419f
From b6d5a57b8181cc2565e2231fc9baf95fc9cc481e Mon Sep 17 00:00:00 2001
8d419f
From: Yu Watanabe <watanabe.yu+github@gmail.com>
8d419f
Date: Sat, 2 Jul 2022 04:18:41 +0900
8d419f
Subject: [PATCH] core: do not filter out systemd.unit= and run-level specifier
8d419f
 from kernel command line
8d419f
8d419f
Fixes a bug introduced by 846f1da465beda990c1c01346311393f485df467.
8d419f
8d419f
The commit 846f1da465beda990c1c01346311393f485df467 made systemd.unit=
8d419f
filtered out from the command line. That causes debug-generator does not
8d419f
work as expected on daemon-reexecute, and we cannot call `systemctl
8d419f
daemon-reexecute` in our test suite running on nspawn.
8d419f
8d419f
Fixes issue reported in https://github.com/systemd/systemd/pull/23851#issuecomment-1170992052.
8d419f
8d419f
(cherry picked from commit bffde9b5869fffc09e7824d2ac0aeb82a31a134b)
8d419f
8d419f
Related: #2087652
8d419f
---
8d419f
 src/core/main.c | 7 -------
8d419f
 1 file changed, 7 deletions(-)
8d419f
8d419f
diff --git a/src/core/main.c b/src/core/main.c
8d419f
index 667e972364..03efaa03be 100644
8d419f
--- a/src/core/main.c
8d419f
+++ b/src/core/main.c
8d419f
@@ -1812,13 +1812,6 @@ static void filter_args(
8d419f
                         continue;
8d419f
                 }
8d419f
 
8d419f
-                if (startswith(src[i],
8d419f
-                               in_initrd() ? "rd.systemd.unit=" : "systemd.unit="))
8d419f
-                        continue;
8d419f
-
8d419f
-                if (runlevel_to_target(src[i]))
8d419f
-                        continue;
8d419f
-
8d419f
                 /* Seems we have a good old option. Let's pass it over to the new instance. */
8d419f
                 dst[(*dst_index)++] = src[i];
8d419f
         }