nspawn: restore journal directory is empty check

This undoes part of commit e6a4a517be.

Instead of removing the error message about non-empty journal bind mount
directories, simply downgrade the message to a warning and proceed.

(cherry picked from commit cdb2b9d05a)
(cherry picked from commit 2b1f027f8e)
This commit is contained in:
Lennart Poettering
2014-06-18 12:34:16 -04:00
committed by Zbigniew Jędrzejewski-Szmek
parent 89f16be75b
commit 06e974ab63
+3
View File
@@ -939,6 +939,9 @@ static int setup_journal(const char *directory) {
} else if (access(p, F_OK) < 0)
return 0;
if (dir_is_empty(q) == 0)
log_warning("%s is not empty, proceeding anyway.", q);
r = mkdir_p(q, 0755);
if (r < 0) {
log_error("Failed to create %s: %m", q);