X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Fmain.c;h=a732c6945afc5a671d134e235cafd31e03241771;hp=38835fc62008a724a4799a396226e51de6d62309;hb=3408ba015aee3a88c91962c028738be757779519;hpb=1f97091d3cb0887c264176b47b0a86c269acf0b5 diff --git a/src/core/main.c b/src/core/main.c index 38835fc62..a732c6945 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1543,7 +1543,15 @@ int main(int argc, char *argv[]) { if (in_initrd()) log_info("Running in initial RAM disk."); - empty_etc = dir_is_empty("/etc") > 0; + /* 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."); } else {