]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
nbd/nbdroot.sh: call nbd-client with "--systemd-mark"
authorHarald Hoyer <harald@redhat.com>
Fri, 16 May 2014 11:33:33 +0000 (13:33 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 29 Jul 2014 09:59:52 +0000 (11:59 +0200)
otherwise nbd-client will get killed by systemd

(cherry picked from commit 056a3f2427b6747d83fc48c5d1e3f85b4058c18f)

modules.d/95nbd/nbdroot.sh

index 2e9d917428e712a0416bceb031b4716ee8379a5c..ddb381929e0c693ecdf65fe3e21d368bd56e1cbb 100755 (executable)
@@ -111,6 +111,10 @@ if [ "$root" = "block:/dev/root" -o "$root" = "dhcp" ]; then
     fi
 fi
 
+if strstr "$(nbd-client --help 2>&1)" "systemd-mark"; then
+    preopts="--systemd-mark $preopts"
+fi
+
 nbd-client $preopts "$nbdserver" $nbdport /dev/nbd0 $opts || exit 1
 
 # NBD doesn't emit uevents when it gets connected, so kick it