Skip to content

Commit

Permalink
bootctl: don't load etc/machine-info from cwd
Browse files Browse the repository at this point in the history
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: 77db9ef ("boot: Make sure we take --root into account everywhere.")
(cherry picked from commit 0452779b0054f5c2724b745b1db33bba1ac8e677)
(cherry picked from commit 8d7eef9ee5ead7c7b47b2ad4418529ac5cf17bb3)
  • Loading branch information
alyssais authored and bluca committed Sep 10, 2024
1 parent 4c0da06 commit a573fd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/boot/bootctl-install.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit a573fd1

Please sign in to comment.