From: Alyssa Ross Date: Wed, 21 Aug 2024 12:21:47 +0000 (+0200) Subject: bootctl: don't load etc/machine-info from cwd X-Git-Tag: v257-rc1~660 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0452779b0054f5c2724b745b1db33bba1ac8e677;p=thirdparty%2Fsystemd.git 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.") --- diff --git a/src/boot/bootctl-install.c b/src/boot/bootctl-install.c index 6f55b98d74b..0612791e07c 100644 --- a/src/boot/bootctl-install.c +++ b/src/boot/bootctl-install.c @@ -45,7 +45,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();