]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: reword notice when /dev is pre-mounted and populated (#4971)
authorLennart Poettering <lennart@poettering.net>
Thu, 29 Dec 2016 10:02:39 +0000 (11:02 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Thu, 29 Dec 2016 10:02:39 +0000 (11:02 +0100)
Fixes: #4676
src/nspawn/nspawn.c

index faf1ecc5df9458f09570f7f37eb34949e91cc32d..e366f642c7be3f22481cf8d38306a06c0fe5d31f 100644 (file)
@@ -1425,12 +1425,9 @@ static int copy_devnodes(const char *dest) {
 
                 } else {
                         if (mknod(to, st.st_mode, st.st_rdev) < 0) {
-                                /*
-                                 * This is some sort of protection too against
-                                 * recursive userns chown on shared /dev/
-                                 */
+                                /* Explicitly warn the user when /dev is already populated. */
                                 if (errno == EEXIST)
-                                        log_notice("%s/dev/ should be an empty directory", dest);
+                                        log_notice("%s/dev is pre-mounted and pre-populated. If a pre-mounted /dev is provided it needs to be an unpopulated file system.", dest);
                                 if (errno != EPERM)
                                         return log_error_errno(errno, "mknod(%s) failed: %m", to);