From b216e2b8e6f933e3b0651e99f0b090aa59a2ac0d Mon Sep 17 00:00:00 2001 From: Aristid Breitkreuz Date: Mon, 24 Nov 2014 22:11:37 +0100 Subject: [PATCH] systemd-nspawn: Ignore existing directories when trying to create mount-points (#4989) --- pkgs/os-specific/linux/systemd/fixes.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/os-specific/linux/systemd/fixes.patch b/pkgs/os-specific/linux/systemd/fixes.patch index 592ea59ad6c..ff31b4a75d4 100644 --- a/pkgs/os-specific/linux/systemd/fixes.patch +++ b/pkgs/os-specific/linux/systemd/fixes.patch @@ -44,6 +44,15 @@ diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index b6d9bc6..04fbe57 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c +@@ -758,7 +758,7 @@ static int mount_binds(const char *dest, + * and char devices. */ + if (S_ISDIR(source_st.st_mode)) { + r = mkdir_label(where, 0755); +- if (r < 0) { ++ if (r < 0 && r != -EEXIST) { + log_error("Failed to create mount point %s: %s", where, strerror(-r)); + + return r; @@ -3073,6 +3073,7 @@ int main(int argc, char *argv[]) { goto finish; }