summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-07-15 11:58:03 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2015-07-15 12:04:31 +0200
commitab822b624bc48410c8d7bd3be1c88c399a44adae (patch)
tree7439b77cbe185b66d815b195a2b2fa2c46181feb
parent8a2abb30b8a4ef97eb69ecdabd31da996abc3df0 (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.
-rw-r--r--src/boot/bootctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c
index ed69fb0ce..faab82dbb 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;