summaryrefslogtreecommitdiff
path: root/src/tmpfiles
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2018-01-10 23:28:44 +0100
committerLennart Poettering <lennart@poettering.net>2018-01-10 23:28:44 +0100
commitd8dab75789ec1ffd53fc06f5f370220ae7b31d9d (patch)
tree8d7ef56a5b3859a9b489fea3d93a71a415292d82 /src/tmpfiles
parenta9883559e3d29246a40973461e57915f4ff4c8ea (diff)
downloadsystemd-d8dab75789ec1ffd53fc06f5f370220ae7b31d9d.tar.gz
tmpfiles: consider /etc uninitialized also when /etc/machine-id is present but empty (#7849)
Diffstat (limited to 'src/tmpfiles')
-rw-r--r--src/tmpfiles/tmpfiles.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index d69073535c..96ffa42089 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -199,12 +199,12 @@ static const Specifier specifier_table[] = {
static int specifier_machine_id_safe(char specifier, void *data, void *userdata, char **ret) {
int r;
- /* If /etc/machine_id is missing (e.g. in a chroot environment), returns
- * a recognizable error so that the caller can skip the rule
+ /* If /etc/machine_id is missing or empty (e.g. in a chroot environment)
+ * return a recognizable error so that the caller can skip the rule
* gracefully. */
r = specifier_machine_id(specifier, data, userdata, ret);
- if (r == -ENOENT)
+ if (IN_SET(r, -ENOENT, -ENOMEDIUM))
return -ENXIO;
return r;