|
|
a3e2b5 |
From 55798355455b9255458d6a705f8766c4dbe3ef73 Mon Sep 17 00:00:00 2001
|
|
|
a3e2b5 |
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
|
a3e2b5 |
Date: Thu, 25 Oct 2018 16:34:00 +0200
|
|
|
a3e2b5 |
Subject: [PATCH] debug-generator: introduce rd.* version of all options
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
(cherry picked from commit a7dd6d04b07f58df5c0294743d76df0be0b4b928)
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
Resolves: #1643429
|
|
|
a3e2b5 |
---
|
|
|
a3e2b5 |
man/systemd-debug-generator.xml | 27 +++++++++++++++++++--------
|
|
|
a3e2b5 |
src/debug-generator/debug-generator.c | 2 +-
|
|
|
a3e2b5 |
2 files changed, 20 insertions(+), 9 deletions(-)
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
diff --git a/man/systemd-debug-generator.xml b/man/systemd-debug-generator.xml
|
|
|
a3e2b5 |
index d5cf4109b0..fa88e8ac01 100644
|
|
|
a3e2b5 |
--- a/man/systemd-debug-generator.xml
|
|
|
a3e2b5 |
+++ b/man/systemd-debug-generator.xml
|
|
|
a3e2b5 |
@@ -33,27 +33,38 @@
|
|
|
a3e2b5 |
that reads the kernel command line and understands three
|
|
|
a3e2b5 |
options:</para>
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
- <para>If the <option>systemd.mask=</option> option is specified
|
|
|
a3e2b5 |
- and followed by a unit name, this unit is masked for the runtime,
|
|
|
a3e2b5 |
- similar to the effect of
|
|
|
a3e2b5 |
+ <para>If the <option>systemd.mask=</option> or <option>rd.systemd.mask=</option>
|
|
|
a3e2b5 |
+ option is specified and followed by a unit name, this unit is
|
|
|
a3e2b5 |
+ masked for the runtime, similar to the effect of
|
|
|
a3e2b5 |
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
|
|
|
a3e2b5 |
<command>mask</command> command. This is useful to boot with
|
|
|
a3e2b5 |
certain units removed from the initial boot transaction for
|
|
|
a3e2b5 |
- debugging system startup. May be specified more than once.</para>
|
|
|
a3e2b5 |
+ debugging system startup. May be specified more than once.
|
|
|
a3e2b5 |
+ <option>rd.systemd.mask=</option> is honored only by initial
|
|
|
a3e2b5 |
+ RAM disk (initrd) while <option>systemd.mask=</option> is
|
|
|
a3e2b5 |
+ honored only in the main system.</para>
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
- <para>If the <option>systemd.wants=</option> option is specified
|
|
|
a3e2b5 |
+ <para>If the <option>systemd.wants=</option> or
|
|
|
a3e2b5 |
+ <option>rd.systemd.wants=</option> option is specified
|
|
|
a3e2b5 |
and followed by a unit name, a start job for this unit is added to
|
|
|
a3e2b5 |
the initial transaction. This is useful to start one or more
|
|
|
a3e2b5 |
- additional units at boot. May be specified more than once.</para>
|
|
|
a3e2b5 |
+ additional units at boot. May be specified more than once.
|
|
|
a3e2b5 |
+ <option>rd.systemd.wants=</option> is honored only by initial
|
|
|
a3e2b5 |
+ RAM disk (initrd) while <option>systemd.wants=</option> is
|
|
|
a3e2b5 |
+ honored only in the main system.</para>
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
- <para>If the <option>systemd.debug_shell</option> option is
|
|
|
a3e2b5 |
+ <para>If the <option>systemd.debug_shell</option> or
|
|
|
a3e2b5 |
+ <option>rd.systemd.debug_shell</option> option is
|
|
|
a3e2b5 |
specified, the debug shell service
|
|
|
a3e2b5 |
<literal>debug-shell.service</literal> is pulled into the boot
|
|
|
a3e2b5 |
transaction. It will spawn a debug shell on tty9 during early
|
|
|
a3e2b5 |
system startup. Note that the shell may also be turned on
|
|
|
a3e2b5 |
persistently by enabling it with
|
|
|
a3e2b5 |
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
|
|
|
a3e2b5 |
- <command>enable</command> command.</para>
|
|
|
a3e2b5 |
+ <command>enable</command> command.
|
|
|
a3e2b5 |
+ <option>rd.systemd.debug_shell=</option> is honored only by initial
|
|
|
a3e2b5 |
+ RAM disk (initrd) while <option>systemd.debug_shell</option> is
|
|
|
a3e2b5 |
+ honored only in the main system.</para>
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
<para><filename>systemd-debug-generator</filename> implements
|
|
|
a3e2b5 |
<citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
|
|
|
a3e2b5 |
diff --git a/src/debug-generator/debug-generator.c b/src/debug-generator/debug-generator.c
|
|
|
a3e2b5 |
index dd6ab94fa2..800d31cebe 100644
|
|
|
a3e2b5 |
--- a/src/debug-generator/debug-generator.c
|
|
|
a3e2b5 |
+++ b/src/debug-generator/debug-generator.c
|
|
|
a3e2b5 |
@@ -154,7 +154,7 @@ int main(int argc, char *argv[]) {
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
umask(0022);
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
- r = proc_cmdline_parse(parse_proc_cmdline_item, NULL, 0);
|
|
|
a3e2b5 |
+ r = proc_cmdline_parse(parse_proc_cmdline_item, NULL, PROC_CMDLINE_RD_STRICT | PROC_CMDLINE_STRIP_RD_PREFIX);
|
|
|
a3e2b5 |
if (r < 0)
|
|
|
a3e2b5 |
log_warning_errno(r, "Failed to parse kernel command line, ignoring: %m");
|
|
|
a3e2b5 |
|