systemd-fstab-generator print logs only to kmsg
(cherry picked from commit 2c6fac999817e3973f67d50081f6f7de5989eac2)
This commit is contained in:
parent
6b3586498d
commit
4ba4c49594
30
systemd-fstab-generator-print-logs-only-to-kmsg.patch
Normal file
30
systemd-fstab-generator-print-logs-only-to-kmsg.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From edba446b58f96db6d01968db0fc398be46188b72 Mon Sep 17 00:00:00 2001
|
||||
From: zhangyao <zhangyao108@huawei.com>
|
||||
Date: Mon, 23 Dec 2024 16:14:37 +0800
|
||||
Subject: [PATCH] systemd-fstab-generator print logs only to kmsg
|
||||
|
||||
---
|
||||
src/fstab-generator/fstab-generator.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
|
||||
index 016f3ba..54b84c0 100644
|
||||
--- a/src/fstab-generator/fstab-generator.c
|
||||
+++ b/src/fstab-generator/fstab-generator.c
|
||||
@@ -1631,6 +1631,13 @@ static int run(int argc, char **argv) {
|
||||
} else {
|
||||
/* Run in generator mode */
|
||||
log_setup_generator();
|
||||
+ /*
|
||||
+ * Writing logs to the journal may cause sendmsg to time out,
|
||||
+ * which leads to systemd startup failure. Therefore, we need
|
||||
+ * to print logs only to kmsg.
|
||||
+ */
|
||||
+ log_set_target(LOG_TARGET_KMSG);
|
||||
+ log_open();
|
||||
|
||||
if (!IN_SET(strv_length(argv), 2, 4))
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
Name: systemd
|
||||
Url: https://systemd.io/
|
||||
Version: 255
|
||||
Release: 33
|
||||
Release: 34
|
||||
License: MIT and LGPLv2+ and GPLv2+
|
||||
Summary: System and Service Manager
|
||||
|
||||
@ -132,6 +132,7 @@ Patch9055: delete-journal-files-except-system.journal-when-jour.patch
|
||||
Patch9056: set-the-cpuset.cpus-mems-of-machine.slice-to-all-by-.patch
|
||||
Patch9057: add-a-new-switch-to-control-whether-udev-complies-wi.patch
|
||||
Patch9058: journal-don-t-enable-systemd-journald-audit.socket.patch
|
||||
Patch9059: systemd-fstab-generator-print-logs-only-to-kmsg.patch
|
||||
|
||||
Patch9801: Systemd-Add-sw64-architecture.patch
|
||||
Patch9802: backport-repart-fix-memory-leak.patch
|
||||
@ -1672,6 +1673,9 @@ fi
|
||||
%{_unitdir}/veritysetup.target
|
||||
|
||||
%changelog
|
||||
* Mon Dec 23 2024 zhangyao <zhangyao108@huawei.com> - 255-34
|
||||
- systemd-fstab-generator print logs only to kmsg
|
||||
|
||||
* Fri Dec 13 2024 zhangyao <zhangyao108@huawei.com> - 255-33
|
||||
- Fix the varlink connection is disconnected when systemd upgrade
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user