pid1: do not warn if /run/systemd/relabel-extra.d/ doesn't exist
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 18 Sep 2019 15:52:30 +0000 (17:52 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 19 Sep 2019 16:01:40 +0000 (18:01 +0200)
After all, that is the expected state.

src/core/mount-setup.c

index 72cf5a2..9d9263e 100644 (file)
@@ -469,7 +469,8 @@ static int relabel_extra(void) {
         }
 
         /* Remove when we complete things. */
-        if (rmdir("/run/systemd/relabel-extra.d") < 0)
+        if (rmdir("/run/systemd/relabel-extra.d") < 0 &&
+            errno != ENOENT)
                 log_warning_errno(errno, "Failed to remove /run/systemd/relabel-extra.d/ directory: %m");
 
         return c;