Skip to content

Commit 30fdcea

Browse files
alyssaisbluca
authored andcommitted
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: 77db9ef ("boot: Make sure we take --root into account everywhere.") (cherry picked from commit 0452779) (cherry picked from commit 8d7eef9) (cherry picked from commit a573fd1) (cherry picked from commit 0b6faf9)
1 parent 4e088c3 commit 30fdcea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/boot/bootctl-install.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static int load_etc_machine_info(void) {
4646
_cleanup_free_ char *p = NULL, *s = NULL, *layout = NULL;
4747
int r;
4848

49-
p = path_join(arg_root, "etc/machine-info");
49+
p = path_join(arg_root, "/etc/machine-info");
5050
if (!p)
5151
return log_oom();
5252

0 commit comments

Comments
 (0)