File 0156-systemd-mdadm-last-resort-add-Conflicts-to-.service-.patch of Package mdadm.5365

From cec72c071bbec386383ec64d25826c4f421efbc0 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@suse.com>
Date: Thu, 28 Jan 2016 11:45:53 +1100
Subject: [PATCH 216/359] systemd/mdadm-last-resort: add Conflicts to .service
 file.
References: bsc#1081910

It seems that having the Conflicts in the .timer file is not sufficient.
Sometimes it works, but if the timer gets requested after the conflicting
block device appears (or was it "before" ...) the timer is not aborted.

Having the Conflicts in both files seems to work reliably.

Url: https://bugzilla.suse.com/show_bug.cgi?id=853944
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Coly Li <colyli@suse.de>

---
 systemd/mdadm-last-resort@.service | 1 +
 1 file changed, 1 insertion(+)

diff --git a/systemd/mdadm-last-resort@.service b/systemd/mdadm-last-resort@.service
index 5179f19..e93d72b 100644
--- a/systemd/mdadm-last-resort@.service
+++ b/systemd/mdadm-last-resort@.service
@@ -1,6 +1,7 @@
 [Unit]
 Description=Activate md array even though degraded
 DefaultDependencies=no
+Conflicts=sys-devices-virtual-block-%i.device
 
 [Service]
 Type=oneshot
-- 
2.16.1

openSUSE Build Service is sponsored by