[arch-releng] [PATCH 2/4] be more flexible about finding the pxe boot interface

Christian Hesse list at eworm.de
Thu May 26 21:53:05 UTC 2016


From: Christian Hesse <mail at eworm.de>

Booting from iPXE we can set bootif_mac without having BOOTIF around.

Signed-off-by: Christian Hesse <mail at eworm.de>
---
 archiso/initcpio/hooks/archiso_pxe_common | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/archiso/initcpio/hooks/archiso_pxe_common b/archiso/initcpio/hooks/archiso_pxe_common
index 66eecfa..cedf585 100644
--- a/archiso/initcpio/hooks/archiso_pxe_common
+++ b/archiso/initcpio/hooks/archiso_pxe_common
@@ -10,9 +10,12 @@ run_hook () {
     # /tmp/net-*.conf
 
     if [[ -n "${ip}" ]]; then
-        if [[ -n "${BOOTIF}" ]]; then
+        if [[ -z "${bootif_mac}" && -n "${BOOTIF}" ]]; then
             bootif_mac=${BOOTIF#01-}
             bootif_mac=${bootif_mac//-/:}
+        fi
+
+        if [[ -n "${bootif_mac}" ]]; then
             for i in /sys/class/net/*/address; do
                 read net_mac < ${i}
                 if [[ "${bootif_mac}" == "${net_mac}" ]]; then
-- 
2.8.3


More information about the arch-releng mailing list