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

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