Package: initramfs-tools
Version: 0.75
Followup-For: Bug #380649

attached patch should use plain ol' shell parameter expansion instead of
cut to support the more complete nfsroot handling.

also available in my bzr branch, amongst the other patches:

http://llama.freegeek.org/~vagrant/bzr-archives/initramfs-tools/vagrant-initramfs-tools

live well,
  vagrant
--- scripts/nfs 2006-08-19 10:54:48.000000000 -0400
+++ ../vagrant-initramfs-tools/scripts/nfs      2006-08-19 10:37:12.000000000 
-0400
@@ -17,6 +17,17 @@
        . /tmp/net-${DEVICE}.conf
        if [ "x${NFSROOT}" = "xauto" ]; then
                NFSROOT=${ROOTSERVER}:${ROOTPATH}
+       elif [ "x${NFSROOT}" != "x" ]; then
+               # support nfsroot option from linux sources 
Documentation/nfsroot.txt:
+               # nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
+               if [ "x${NFSOPTS}" = "x" ]; then
+                       NFSOPTS="-o ${NFSROOT#*,}"
+               fi
+               NFSROOT=${NFSROOT%%,*}
+               if [ "${NFSROOT#*:}" = "$NFSROOT" ]; then
+                       # get rootserver from dhcp
+                       NFSROOT=${ROOTSERVER}:${NFSROOT}
+               fi
        fi
 
        if [ "x${NFSOPTS}" = "x" ]; then

Reply via email to