From: David Herrmann Date: Wed, 15 Jul 2015 09:58:03 +0000 (+0200) Subject: sd-boot: ignore missing /etc/machine-id X-Git-Tag: v223~101 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab822b624bc48410c8d7bd3be1c88c399a44adae;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index ed69fb0cec9..faab82dbb82 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;