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

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