diff options
author | maximilian attems <maks@debian.org> | 2010-04-10 07:04:05 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2010-04-10 15:57:30 +0200 |
commit | 24875289070511b1039b690e72cf241b5d554688 (patch) | |
tree | a1ac55838160425911e632a27cbbb13c2868eb38 | |
parent | 891b651f29f356e67d77a9a3bb04508dc816756b (diff) | |
download | initramfs-tools-24875289070511b1039b690e72cf241b5d554688.tar.gz initramfs-tools-24875289070511b1039b690e72cf241b5d554688.zip |
configure_networking(): work with empty DEVICE string
initramfs-tools currently requires a device to be hard-coded, but this
is not much use if the network device is not known ahead of time. If
the device specified in either /etc/initramfs-tools/initramfs.conf or
on the ip=xxx kernel command line.
usefull for multiple net devices.
Based on patch by Tim Small <tim@seoss.co.uk>
Closes: #566295, #575766
Reviewed-by: Vagrant Cascadian <vagrant@freegeek.org>
Signed-off-by: maximilian attems <maks@debian.org>
-rw-r--r-- | conf/initramfs.conf | 5 | ||||
-rw-r--r-- | scripts/functions | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/conf/initramfs.conf b/conf/initramfs.conf index 2aa380f..0a108a8 100644 --- a/conf/initramfs.conf +++ b/conf/initramfs.conf @@ -58,10 +58,11 @@ BOOT=local # # DEVICE: ... # -# Specify the network interface, like eth0 +# Specify a specific network interface, like eth0 +# Overriden by optional ip= bootarg # -DEVICE=eth0 +DEVICE= # # NFSROOT: [ auto | HOST:MOUNT ] diff --git a/scripts/functions b/scripts/functions index 88f1bbd..1cc9be6 100644 --- a/scripts/functions +++ b/scripts/functions @@ -363,10 +363,10 @@ configure_networking() ;; ""|on|any) # Bring up device - ipconfig -t ${ROUNDTTT} ${DEVICE} + ipconfig -t ${ROUNDTTT} "${DEVICE}" ;; dhcp|bootp|rarp|both) - ipconfig -t ${ROUNDTTT} -c ${IP} -d ${DEVICE} + ipconfig -t ${ROUNDTTT} -c ${IP} -d "${DEVICE}" ;; *) ipconfig -t ${ROUNDTTT} -d $IP @@ -391,7 +391,8 @@ configure_networking() # source specific bootdevice . /tmp/net-${DEVICE}.conf else - # source any interface as not exaclty specified + # source any interface... + # ipconfig should have quit after first response . /tmp/net-*.conf fi } |