[archiso] Add support to setups with more than one network card.

Otherwise archiso_pxe_nbd hook can configure the incorrect network card,
because ipconfig will configure all interfaces available.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
Gerardo Exequiel Pozzi 2010-03-21 17:46:16 -03:00
parent 9db3b52dda
commit a60a68eb88

View File

@ -5,6 +5,15 @@ run_hook () {
: > /ip_opts
if [ -n "${ip}" ]; then
if [ -n "${BOOTIF}" ]; then
bootif_mac=${BOOTIF#01-}
bootif_mac=${bootif_mac//-/:}
bootif_dev=$(grep -l $bootif_mac /sys/class/net/*/address)
bootif_dev=${bootif_dev#/sys/class/net/}
bootif_dev=${bootif_dev%/address}
ip="$ip::$bootif_dev"
fi
# setup network and save some values
ipconfig "ip=${ip}" | while read line; do
# echo ":: ${line}"