summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-07 11:47:46 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-07 15:25:55 +0200
commit3408ba015aee3a88c91962c028738be757779519 (patch)
tree0eed61570cafedbf47410b8855c49eaf44c8d024 /src
parent3a8a916338d8446b938f3cf40f6aae0c611892e3 (diff)
main: explain our /etc empty check a bit in a comment
Diffstat (limited to 'src')
-rw-r--r--src/core/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 1ca899998e..a732c6945a 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1543,6 +1543,14 @@ int main(int argc, char *argv[]) {
if (in_initrd())
log_info("Running in initial RAM disk.");
+ /* Let's check whether /etc is already populated. We
+ * don't actually really check for that, but use
+ * /etc/machine-id as flag file. This allows container
+ * managers and installers to provision a couple of
+ * files already. If the container manager wants to
+ * provision the machine ID itself it should pass
+ * $container_uuid to PID 1.*/
+
empty_etc = access("/etc/machine-id", F_OK) < 0;
if (empty_etc)
log_info("Running with unpopulated /etc.");