On Tue, Mar 18, 2008 at 11:37:12PM -0700, Vagrant Cascadian wrote:
> 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.

Yeah, that makes sense.

However, I don't think another parameter is needed for that; just using
'nbdroot=,1234' should work too, and is a bit clearer IMO. Also, I do
not see any point in specifying the server, but not the port; while it
is possible to get a server from DHCP, it is not possible to get the
port from there.

Thoughts?

> --- /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?
> 
> 
> 

-- 
<Lo-lan-do> Home is where you have to wash the dishes.
  -- #debian-devel, Freenode, 2004-09-22



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

Reply via email to