]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(nbd): assume nbd version >= 3.8
authorHarald Hoyer <harald@redhat.com>
Wed, 12 May 2021 13:12:54 +0000 (15:12 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 14 May 2021 06:34:59 +0000 (08:34 +0200)
This reduces the quirks.

modules.d/95nbd/nbdroot.sh

index 50322747f40144839e4880987e249efb4d4a5a3a..b1a80308a528d22b668e3ade7fb51cd7bd837025 100755 (executable)
@@ -124,22 +124,14 @@ EOF
     # to create the /sysroot mount.
 fi
 
-# supported since nbd 3.8 via 77e97612
-if strstr "$(nbd-client --help 2>&1)" "systemd-mark"; then
-    preopts="-systemd-mark $preopts"
-fi
-
 if ! [ "$nbdport" -gt 0 ] 2> /dev/null; then
     nbdport="-name $nbdport"
 fi
 
 if ! nbd-client -check /dev/nbd0 > /dev/null; then
     # shellcheck disable=SC2086
-    nbd-client "$nbdserver" $nbdport /dev/nbd0 $preopts $opts || exit 1
+    nbd-client -p -systemd-mark "$nbdserver" $nbdport /dev/nbd0 $opts || exit 1
 fi
 
-# NBD doesn't emit uevents when it gets connected, so kick it
-echo change > /sys/block/nbd0/uevent
-udevadm settle
 need_shutdown
 exit 0