Blame SOURCES/0172-nbd-nbdroot.sh-call-nbd-client-with-systemd-mark.patch

712866
From 1175816c301dfc88f6ef4ecc009e1475a0d5362d Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Fri, 16 May 2014 13:33:33 +0200
712866
Subject: [PATCH] nbd/nbdroot.sh: call nbd-client with "--systemd-mark"
712866
712866
otherwise nbd-client will get killed by systemd
712866
712866
(cherry picked from commit 056a3f2427b6747d83fc48c5d1e3f85b4058c18f)
712866
---
712866
 modules.d/95nbd/nbdroot.sh | 4 ++++
712866
 1 file changed, 4 insertions(+)
712866
712866
diff --git a/modules.d/95nbd/nbdroot.sh b/modules.d/95nbd/nbdroot.sh
712866
index 2e9d917..ddb3819 100755
712866
--- a/modules.d/95nbd/nbdroot.sh
712866
+++ b/modules.d/95nbd/nbdroot.sh
712866
@@ -111,6 +111,10 @@ if [ "$root" = "block:/dev/root" -o "$root" = "dhcp" ]; then
712866
     fi
712866
 fi
712866
 
712866
+if strstr "$(nbd-client --help 2>&1)" "systemd-mark"; then
712866
+    preopts="--systemd-mark $preopts"
712866
+fi
712866
+
712866
 nbd-client $preopts "$nbdserver" $nbdport /dev/nbd0 $opts || exit 1
712866
 
712866
 # NBD doesn't emit uevents when it gets connected, so kick it