diff options
author | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2010-03-21 17:46:16 -0300 |
---|---|---|
committer | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2010-03-21 18:51:37 -0300 |
commit | a60a68eb883425b213a9267832e1c24875af3361 (patch) | |
tree | 2c2514c6cedb79195f0e86cc29a8b0825b5563c8 | |
parent | 9db3b52dda72bf029eed4f268565e8da1aa3f255 (diff) | |
download | archiso32-a60a68eb883425b213a9267832e1c24875af3361.tar.xz |
[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>
-rw-r--r-- | archiso/hooks/archiso_pxe_nbd | 9 |
1 files changed, 9 insertions, 0 deletions
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}" |