chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3a8a916
)
main: explain our /etc empty check a bit in a comment
author
Lennart Poettering
<lennart@poettering.net>
Mon, 7 Jul 2014 09:47:46 +0000
(11:47 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 7 Jul 2014 13:25:55 +0000
(15:25 +0200)
src/core/main.c
patch
|
blob
|
history
diff --git
a/src/core/main.c
b/src/core/main.c
index 1ca899998ed54e43767f9159f373b389553ff915..a732c6945afc5a671d134e235cafd31e03241771 100644
(file)
--- 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.");
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.");
empty_etc = access("/etc/machine-id", F_OK) < 0;
if (empty_etc)
log_info("Running with unpopulated /etc.");