|
Lines 8-44
Link Here
|
| 8 |
# parse nfs bootargs + launch ipconfig and nfsmount |
8 |
# parse nfs bootargs + launch ipconfig and nfsmount |
| 9 |
do_nfsmount() |
9 |
do_nfsmount() |
| 10 |
{ |
10 |
{ |
| 11 |
# support ip options see linux sources Documentation/nfsroot.txt |
11 |
run_scripts /scripts/dhcp |
| 12 |
case ${IPOPTS} in |
|
|
| 13 |
none|off) |
| 14 |
# Do nothing |
| 15 |
;; |
| 16 |
""|on|any) |
| 17 |
# Bring up device |
| 18 |
ipconfig ${DEVICE} |
| 19 |
;; |
| 20 |
dhcp|bootp|rarp|both) |
| 21 |
ipconfig -c ${IPOPTS} -d ${DEVICE} |
| 22 |
;; |
| 23 |
*) |
| 24 |
ipconfig -d $IPOPTS |
| 25 |
|
| 26 |
# grab device entry from ip option |
| 27 |
NEW_DEVICE=${IPOPTS#*:*:*:*:*:*} |
| 28 |
if [ "${NEW_DEVICE}" != "${IPOPTS}" ]; then |
| 29 |
NEW_DEVICE=${NEW_DEVICE%:*} |
| 30 |
else |
| 31 |
# wrong parse, possibly only a partial string |
| 32 |
NEW_DEVICE= |
| 33 |
fi |
| 34 |
if [ -n "${NEW_DEVICE}" ]; then |
| 35 |
DEVICE="${NEW_DEVICE}" |
| 36 |
fi |
| 37 |
;; |
| 38 |
esac |
| 39 |
|
| 40 |
# source relevant ipconfig output |
| 41 |
. /tmp/net-${DEVICE}.conf |
| 42 |
|
12 |
|
| 43 |
# get nfs root from dhcp |
13 |
# get nfs root from dhcp |
| 44 |
if [ "x${NFSROOT}" = "xauto" ]; then |
14 |
if [ "x${NFSROOT}" = "xauto" ]; then |