Package: nbd-client Version: 1:2.9.9-6 Severity: wishlist Tags: patch the following patch provides the ability to specify just the nbdport at the boot prompt, and getting the server ip address from DHCP. this makes it possible to server the same read-only image on multiple networks without having to configure boot options on all machines.
--- /usr/share/initramfs-tools/scripts/local-top/nbd 2008-01-26 07:22:29.000000000 -0800 +++ nbd 2008-03-18 23:16:15.000000000 -0700 @@ -18,14 +18,19 @@ nbdsrv=$(echo "$nbdroot" | sed -e "s/,[^,]*$//") nbdport=$(echo "$nbdroot" | sed -e "s/^[^,]*,//") ;; + nbdport=*) + nbdport="${x#nbdport=}" + ;; + nbdsrv=*) + nbdsrv="${x#nbdsrv=}" + ;; ip=*) IPOPTS="${x#ip=}" ;; esac done -if [ -z "$nbdroot" ] -then +if [ -z "$nbdport" ]; then log_failure_msg "Insufficient information to set up nbd, quitting (nbdsrv=$nbdsrv nbdport=$nbdport nbdroot=$nbdroot)" exit 0 fi @@ -33,6 +38,19 @@ DEVICE=eth0 configure_networking + +if [ -z "$nbdsrv" ] +then + # get server from DHCP + nbdsrv=${ROOTSERVER} +fi + +if [ -z "$nbdsrv" ] +then + log_failure_msg "Insufficient information to set up nbd, quitting (nbdsrv=$nbdsrv nbdport=$nbdport nbdroot=$nbdroot)" + exit 0 +fi + /sbin/nbd-client $nbdsrv $nbdport /dev/nbd0 -persist # This should be removed once the cfq scheduler no longer deadlocks nbd # devices thanks for your work on nbd! live well, vagrant p.s. what's the -persist option for nbd-client do? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]