chiark / gitweb /
tmpfiles: skip mknod() on -EPERM (device cgroup)
authorKay Sievers <kay@vrfy.org>
Fri, 13 Jun 2014 02:11:11 +0000 (04:11 +0200)
committerKay Sievers <kay@vrfy.org>
Fri, 13 Jun 2014 02:12:50 +0000 (04:12 +0200)
src/tmpfiles/tmpfiles.c

index f515fe8..df52085 100644 (file)
@@ -792,9 +792,17 @@ static int create_item(Item *i) {
                         label_context_clear();
                 }
 
-                if (r < 0 && errno != EEXIST) {
-                        log_error("Failed to create device node %s: %m", i->path);
-                        return -errno;
+                if (r < 0) {
+                        if (errno == EPERM) {
+                                log_debug("We lack permissions, possibly because of cgroup configuration; "
+                                          "skipping creation of device node %s.", i->path);
+                                return 0;
+                        }
+
+                        if (errno != EEXIST) {
+                                log_error("Failed to create device node %s: %m", i->path);
+                                return -errno;
+                        }
                 }
 
                 if (stat(i->path, &st) < 0) {