mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 11:55:44 +03:00
tmpfiles: skip mknod() on -EPERM (device cgroup)
This commit is contained in:
parent
c1b6b04f0e
commit
6555ad8e9d
@ -792,10 +792,18 @@ static int create_item(Item *i) {
|
||||
label_context_clear();
|
||||
}
|
||||
|
||||
if (r < 0 && errno != EEXIST) {
|
||||
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) {
|
||||
log_error("stat(%s) failed: %m", i->path);
|
||||
|
Loading…
Reference in New Issue
Block a user