From a60a68eb883425b213a9267832e1c24875af3361 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sun, 21 Mar 2010 17:46:16 -0300 Subject: [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 --- archiso/hooks/archiso_pxe_nbd | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'archiso/hooks') diff --git a/archiso/hooks/archiso_pxe_nbd b/archiso/hooks/archiso_pxe_nbd index 2d4163e..c277b78 100644 --- a/archiso/hooks/archiso_pxe_nbd +++ b/archiso/hooks/archiso_pxe_nbd @@ -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}" -- cgit v1.2.3-54-g00ecf