File 0105-nvme-cli-Check-for-sysfs-interface-before-NVMe-disco.patch of Package nvme-cli.11346

From 1176e581e44f54c617395e2f778ea8ac9808a1a3 Mon Sep 17 00:00:00 2001
From: Simon Schricker <sschricker@suse.de>
Date: Mon, 6 May 2019 11:43:23 +0200
Subject: [PATCH] nvme-cli: Check for sysfs interface before NVMe discovery

This prevents an unnecessary error message in the case that the nvme-fc
kernel module is not loaded and the
/sys/class/fc/fc_udev_device/nvme_discovery handle is not available.
---
 nvme-fc-autoconnect/nvmefc-boot-connections.service | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nvme-fc-autoconnect/nvmefc-boot-connections.service b/nvme-fc-autoconnect/nvmefc-boot-connections.service
index aa35c15..ffa7087 100644
--- a/nvme-fc-autoconnect/nvmefc-boot-connections.service
+++ b/nvme-fc-autoconnect/nvmefc-boot-connections.service
@@ -1,5 +1,6 @@
 [Unit]
 Description=Auto-connect to subsystems on FC-NVME devices during boot
+ConditionPathExists=/sys/class/fc/fc_udev_device/nvme_discovery
 
 [Service]
 Type=oneshot
-- 
2.16.4
openSUSE Build Service is sponsored by