summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2009-02-23 15:10:21 +0100
committermaximilian attems <maks@debian.org>2009-02-23 15:10:21 +0100
commitb458a270b7335b9a8b137ec0ac69b21a33bf58c3 (patch)
treec877255725833bb65797f5948a5567958d4637d9 /scripts
parent21ccf36d1ff1f39cbefce34de7287cf99307c93c (diff)
downloadinitramfs-tools-b458a270b7335b9a8b137ec0ac69b21a33bf58c3.tar.gz
initramfs-tools-b458a270b7335b9a8b137ec0ac69b21a33bf58c3.zip
init: export ip root param for configure_networking()
while at it cleanup the variable name that came due to legacy naming nfsopts in a very early initramfs-tools release. "The local-top/iscsi initramfs integration script uses the configure_networking function, which depends on the IPOPTS environmental variable set by the init script. However, this variable is not available, because it's not exported from init, and local-top/iscsi is not sourced but executed. Thus static IP configuration on the kernel command line is not communicated to the script." (closes: #516746) Reported-by: Ferenc Wagner <wferi@niif.hu>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/functions b/scripts/functions
index f715e68..c024eeb 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -263,7 +263,7 @@ configure_networking()
# support ip options see linux sources
# Documentation/filesystems/nfsroot.txt
- case ${IPOPTS} in
+ case ${IP} in
none|off)
# Do nothing
;;
@@ -272,14 +272,14 @@ configure_networking()
ipconfig -t 180 ${DEVICE}
;;
dhcp|bootp|rarp|both)
- ipconfig -t 180 -c ${IPOPTS} -d ${DEVICE}
+ ipconfig -t 180 -c ${IP} -d ${DEVICE}
;;
*)
- ipconfig -t 180 -d $IPOPTS
+ ipconfig -t 180 -d $IP
# grab device entry from ip option
- NEW_DEVICE=${IPOPTS#*:*:*:*:*:*}
- if [ "${NEW_DEVICE}" != "${IPOPTS}" ]; then
+ NEW_DEVICE=${IP#*:*:*:*:*:*}
+ if [ "${NEW_DEVICE}" != "${IP}" ]; then
NEW_DEVICE=${NEW_DEVICE%:*}
else
# wrong parse, possibly only a partial string