diff options
author | maximilian attems <maks@debian.org> | 2006-08-23 09:22:54 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2006-08-23 09:22:54 +0200 |
commit | fabe918dee7da26d177d67d4aa8fe3fd6e83e513 (patch) | |
tree | 5dee066c10e912f5328dba7de3032cd6058019dc /scripts/nfs | |
parent | d1d6763409a1260708423e0092d7bc4182275773 (diff) | |
download | initramfs-tools-fabe918dee7da26d177d67d4aa8fe3fd6e83e513.tar.gz initramfs-tools-fabe918dee7da26d177d67d4aa8fe3fd6e83e513.zip |
- improved nfsroo parsing
- added rootdelay and rootfstype bootargs
- document this changes
- initrd-tools backward compatible mdadm assembe and then run mdrun
- update-initramfs really checkout use_bootloader from /etc/kernel-img.conf
- tighter klibc deps
Diffstat (limited to 'scripts/nfs')
-rw-r--r-- | scripts/nfs | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/scripts/nfs b/scripts/nfs index 5bfb03d..844db70 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -13,13 +13,57 @@ mountroot () # For DHCP modprobe -q af_packet - ipconfig ${DEVICE} + # support ip options see linux sources Documentation/nfsroot.txt + case ${IPOPTS} in + none|off) + # Do nothing + ;; + ""|on|any) + # Bring up device + ipconfig ${DEVICE} + ;; + dhcp|bootb|rarp|both) + ipconfig -c ${IPOPTS} -d ${DEVICE} + ;; + *) + ipconfig -d $IPOPTS + + # grab device entry from full line + NEW_DEVICE=${IPOPTS#*:*:*:*:*:*} + NEW_DEVICE=${NEW_DEVICE%:*} + if [ -n "${NEW_DEVICE}" ]; then + DEVICE="${NEW_DEVICE}" + fi + # grab server-ip + SERVER_IP=${IPOPTS#*:} + SERVER_IP=${SERVER_IP%:*:*:*:*:*:*} + ;; + esac + + # FIXME: who writes that? . /tmp/net-${DEVICE}.conf + + # get nfs root from dhcp if [ "x${NFSROOT}" = "xauto" ]; then NFSROOT=${ROOTSERVER}:${ROOTPATH} + # nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>] + elif [ -n "${NFSROOT}" ]; then + # nfs options are an optional arg + if [ "${NFSROOT#*,}" != "${NFSROOT}" ]; then + NFSOPTS="-o ${NFSROOT#*,}" + fi + NFSROOT=${NFSROOT%%,*} + # server-ip could be passed by ip + if [ "${NFSROOT#*:}" = "$NFSROOT" ]; then + if [ -n "${SERVER_IP}" ]; then + NFSROOT="${SERVER_IP}:${NFSROOT}" + else + NFSROOT=${ROOTSERVER}:${ROOTPATH} + fi + fi fi - if [ "x${NFSOPTS}" = "x" ]; then + if [ -z "${NFSOPTS}" ]; then NFSOPTS="-o retrans=10" fi |