Package: nbd-client
Version: 1:2.9.9-6
Severity: wishlist
Tags: patch

there are several places where the root device is hard-coded to
/dev/nbd0. the following patch should fix this:

--- /usr/share/initramfs-tools/scripts/local-top/nbd    2008-01-26 
07:22:29.000000000 -0800
+++ nbd 2008-03-18 23:30:52.000000000 -0700
@@ -13,6 +13,10 @@
 for x in $(cat /proc/cmdline); do
        # We don't need to redo what all of what /init already did...
        case $x in
+               root=/dev/nbd*)
+                       nbdrootdev="${x#root=}"
+                       nbdbasedev="${x#root=/dev/}"
+                       ;;
                nbdroot=*,*)
                        nbdroot="${x#nbdroot=}"
                        nbdsrv=$(echo "$nbdroot" | sed -e "s/,[^,]*$//")
@@ -24,7 +28,7 @@
        esac
 done
 
-if [ -z "$nbdroot" ]
+if [ -z "$nbdroot" ] || [ -z "$nbdrootdev" ]
 then
        log_failure_msg "Insufficient information to set up nbd, quitting 
(nbdsrv=$nbdsrv nbdport=$nbdport nbdroot=$nbdroot)"
        exit 0
@@ -33,10 +37,10 @@
 DEVICE=eth0
 
 configure_networking
-/sbin/nbd-client $nbdsrv $nbdport /dev/nbd0 -persist
+/sbin/nbd-client $nbdsrv $nbdport $nbdrootdev -persist
 # This should be removed once the cfq scheduler no longer deadlocks nbd
 # devices
-if grep '\[cfq\]' /sys/block/nbd0/queue/scheduler >/dev/null
+if grep '\[cfq\]' /sys/block/$nbdbasedev/queue/scheduler >/dev/null
 then
-       echo deadline > /sys/block/nbd0/queue/scheduler
+       echo deadline > /sys/block/$nbdbasedev/queue/scheduler
 fi

thanks.

live well,
  vagrant



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to