Blame 0423-nspawn-restore-journal-directory-is-empty-check.patch
|
|
7f93bc2 |
From 06e974ab63f9500d856c10dbcb84ea60045abe69 Mon Sep 17 00:00:00 2001
|
|
|
a59965a |
From: Lennart Poettering <lennart@poettering.net>
|
|
|
a59965a |
Date: Thu, 22 May 2014 15:19:46 +0900
|
|
|
a59965a |
Subject: [PATCH] nspawn: restore journal directory is empty check
|
|
|
a59965a |
|
|
|
a59965a |
This undoes part of commit e6a4a517befe559adf6d1dbbadf425c3538849c9.
|
|
|
a59965a |
|
|
|
a59965a |
Instead of removing the error message about non-empty journal bind mount
|
|
|
a59965a |
directories, simply downgrade the message to a warning and proceed.
|
|
|
a59965a |
|
|
|
a59965a |
(cherry picked from commit cdb2b9d05a2f3d649f47bd2ba24eb3fe30b52e92)
|
|
|
a59965a |
(cherry picked from commit 2b1f027f8e194fdb52bc75d3607b01232bdbee15)
|
|
|
a59965a |
---
|
|
|
a59965a |
src/nspawn/nspawn.c | 3 +++
|
|
|
a59965a |
1 file changed, 3 insertions(+)
|
|
|
a59965a |
|
|
|
a59965a |
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
|
|
|
a59965a |
index d645001..28e50fb 100644
|
|
|
a59965a |
--- a/src/nspawn/nspawn.c
|
|
|
a59965a |
+++ b/src/nspawn/nspawn.c
|
|
|
a59965a |
@@ -939,6 +939,9 @@ static int setup_journal(const char *directory) {
|
|
|
a59965a |
} else if (access(p, F_OK) < 0)
|
|
|
a59965a |
return 0;
|
|
|
a59965a |
|
|
|
a59965a |
+ if (dir_is_empty(q) == 0)
|
|
|
a59965a |
+ log_warning("%s is not empty, proceeding anyway.", q);
|
|
|
a59965a |
+
|
|
|
a59965a |
r = mkdir_p(q, 0755);
|
|
|
a59965a |
if (r < 0) {
|
|
|
a59965a |
log_error("Failed to create %s: %m", q);
|