salimma / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone
Blob Blame History Raw
From 8382dfb6c20771eaa8a5f70839ca51e2111f5ee4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 25 Oct 2014 15:15:28 -0400
Subject: [PATCH] systemctl: do not ignore errors in symlink removal

On an ro fs, systemctl disable ... would fail silently.

(cherry picked from commit e95c98378ac2d34df864de4a9b785fd17defb77b)
---
 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 f49c3d349c..f67ebf5606 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -1572,7 +1572,7 @@ int unit_file_disable(
         r = install_context_mark_for_removal(&c, &paths, &remove_symlinks_to, config_path, root_dir);
 
         q = remove_marked_symlinks(remove_symlinks_to, config_path, changes, n_changes, files);
-        if (r == 0)
+        if (r >= 0)
                 r = q;
 
         return r;