From a573fd18483ea3e14cef1a7c7d1c6b825dce0df5 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 21 Aug 2024 14:21:47 +0200 Subject: [PATCH] bootctl: don't load etc/machine-info from cwd arg_root defaults to null, so if --root isn't given, this would try reading etc/machine-info from the current working directory, which is likely to fail. Fixes: 77db9ef2ab ("boot: Make sure we take --root into account everywhere.") (cherry picked from commit 0452779b0054f5c2724b745b1db33bba1ac8e677) (cherry picked from commit 8d7eef9ee5ead7c7b47b2ad4418529ac5cf17bb3) --- src/boot/bootctl-install.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boot/bootctl-install.c b/src/boot/bootctl-install.c index bacbbb29390..9a068a2c978 100644 --- a/src/boot/bootctl-install.c +++ b/src/boot/bootctl-install.c @@ -44,7 +44,7 @@ static int load_etc_machine_info(void) { _cleanup_free_ char *p = NULL, *s = NULL, *layout = NULL; int r; - p = path_join(arg_root, "etc/machine-info"); + p = path_join(arg_root, "/etc/machine-info"); if (!p) return log_oom();