Package: nbd-client
Severity: wishlist
Tags: patch

currently, the only way to configure NBD root is to specify all of the
information via /proc/cmdline, largely through the nbdroot variable.

since it's is loaded over the network, NBD root could be enabled if certain
values were passed via DHCP.

this probably doesn't work robustly due to not having all variables set for
configure_networking, but it should demonstrate setting the ROOTPATH to
nbdroot= via DHCP:

--- nbd-client.initrd.orig      2010-02-03 00:16:23.000000000 -0800
+++ nbd-client.initrd   2010-02-03 00:28:35.000000000 -0800
@@ -12,6 +12,12 @@
 log_begin_msg "Setting up nbd-client"
 for x in $(cat /proc/cmdline); do
        # We don't need to redo what all of what /init already did...
+       case $x in
+               nbdroot=dhcp)
+                       configure_networking
+                       x=${ROOTPATH}
+                       ;;
+       esac
        case $x in
                nbdroot=*,*,*)
                        nbdroot="${x#nbdroot=}"

alternately or additionally, sourcing another file (/conf/nbdroot.conf) in
addition to parsing /proc/cmdline would allow other scripts to pass variables
to the nbd script.

my current goal is to be able to write a wrapper script for ltsp that does
different things based on dhcp responses, and one of the options is to use
nbd-client's NBD root support, though currently being so dependent on
/proc/cmdline makes this difficult.

live well,
  vagrant



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to