Blob Blame History Raw
From ee2b7cbcd0633aaddd4f758580e9157dea0e6a1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 11 Aug 2016 21:53:32 -0400
Subject: [PATCH] systemctl: fix preset-all with missing /etc/systemd/system
If the directory is missing, we can assume that those pesky symlinks are gone too.
(cherry picked from commit 32d9493e593fed7fe5b4dd1e92fe4fd419042fe5)
---
src/shared/install.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/install.c b/src/shared/install.c
index 7b49e1ece9..2d9306058d 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -620,7 +620,7 @@ static int remove_marked_symlinks(
fd = open(config_path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW);
if (fd < 0)
- return -errno;
+ return errno == ENOENT ? 0 : -errno;
do {
int q, cfd;
--
2.9.0