diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-07-15 11:58:03 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-07-15 12:04:31 +0200 |
commit | ab822b624bc48410c8d7bd3be1c88c399a44adae (patch) | |
tree | 7439b77cbe185b66d815b195a2b2fa2c46181feb /src/boot | |
parent | 8a2abb30b8a4ef97eb69ecdabd31da996abc3df0 (diff) |
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.
Diffstat (limited to 'src/boot')
-rw-r--r-- | src/boot/bootctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index ed69fb0cec..faab82dbb8 100644 --- a/src/boot/bootctl.c +++ b/src/boot/bootctl.c @@ -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; |