projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a2abb3
)
sd-boot: ignore missing /etc/machine-id
author
David Herrmann
<dh.herrmann@gmail.com>
Wed, 15 Jul 2015 09:58:03 +0000
(11:58 +0200)
committer
David Herrmann
<dh.herrmann@gmail.com>
Wed, 15 Jul 2015 10:04:31 +0000
(12:04 +0200)
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.
src/boot/bootctl.c
patch
|
blob
|
history
diff --git
a/src/boot/bootctl.c
b/src/boot/bootctl.c
index
ed69fb0
..
faab82d
100644
(file)
--- 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;