sd-boot: ignore missing /etc/machine-id
If /etc/machine-id is missing (eg., gold images), we should not fail installing sd-boot. This is a perfectly fine use-case and we should simply skip installing the default loader config in that case.
This commit is contained in:
parent
8a2abb30b8
commit
ab822b624b
|
@ -888,7 +888,7 @@ static int install_loader_config(const char *esp_path) {
|
|||
|
||||
f = fopen("/etc/machine-id", "re");
|
||||
if (!f)
|
||||
return -errno;
|
||||
return errno == ENOENT ? 0 : -errno;
|
||||
|
||||
if (fgets(line, sizeof(line), f) != NULL) {
|
||||
char *s;
|
||||
|
|
Loading…
Reference in a new issue