]> 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>
Fri, 16 May 2014 11:33:33 +0000 (13:33 +0200)
otherwise nbd-client will get killed by systemd

modules.d/95nbd/nbdroot.sh

index 32f346d3d9e7c50b343f7a370a53a71bb30d00b2..8bfbebcbda0ae6433388ae369afe59a8b6192263 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