]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: don't inherit read-only flag from disk image if --ephemeral is used
authorLennart Poettering <lennart@poettering.net>
Wed, 22 Apr 2015 14:56:51 +0000 (16:56 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 22 Apr 2015 14:56:51 +0000 (16:56 +0200)
When --ephemeral is used there's no need to keep the image read-only, so
let's not do that then.

src/nspawn/nspawn.c

index 1a9b3be5ecbdefb141de764a002ba748d4d247d2..f43ffd97c51b2dcfb289d16dbb026c1e500fe501 100644 (file)
@@ -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();