summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-04-22 16:56:51 +0200
committerLennart Poettering <lennart@poettering.net>2015-04-22 16:56:51 +0200
commitaee327b8169670986f6a48acbd5ffe1355bfcf27 (patch)
tree93b6054a1960fe30f22cab89e1c951d2072b5afa /src
parentffb296b2c28c32cccff512e90a1696eaf0c23708 (diff)
nspawn: don't inherit read-only flag from disk image if --ephemeral is used
When --ephemeral is used there's no need to keep the image read-only, so let's not do that then.
Diffstat (limited to 'src')
-rw-r--r--src/nspawn/nspawn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 1a9b3be5ec..f43ffd97c5 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -3607,7 +3607,8 @@ static int determine_names(void) {
if (r < 0)
return log_error_errno(r, "Invalid image directory: %m");
- arg_read_only = arg_read_only || i->read_only;
+ if (!arg_ephemeral)
+ arg_read_only = arg_read_only || i->read_only;
} else
arg_directory = get_current_dir_name();