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