diff options
| author | fdupoux <fdupoux@users.sourceforge.net> | 2020-11-18 21:12:00 +0000 |
|---|---|---|
| committer | fdupoux <fdupoux@users.sourceforge.net> | 2020-11-18 21:16:27 +0000 |
| commit | 2c99df5c9bb89308231a0281d3b8399bb06cc4c0 (patch) | |
| tree | 1064de965d644347962b79fb84d0bd32d8a4097c | |
| parent | 3160db0e9ec448e06838805ac5dc01b575741668 (diff) | |
| download | archiso-2c99df5c9bb89308231a0281d3b8399bb06cc4c0.tar.gz archiso-2c99df5c9bb89308231a0281d3b8399bb06cc4c0.tar.bz2 | |
Reset network interfaces at the end of the PXE boot to allow DHCP to run
| -rw-r--r-- | archiso/initcpio/hooks/archiso_pxe_common | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/archiso/initcpio/hooks/archiso_pxe_common b/archiso/initcpio/hooks/archiso_pxe_common index f02ef12..2e567ec 100644 --- a/archiso/initcpio/hooks/archiso_pxe_common +++ b/archiso/initcpio/hooks/archiso_pxe_common @@ -67,10 +67,11 @@ run_latehook () { # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() if [ "${copytoram}" = "y" ]; then - if [ -n "${bootif_dev}" ]; then - ip addr flush dev "${bootif_dev}" - ip link set "${bootif_dev}" down - fi + for curif in /sys/class/net/*; do + netdev=${curif#/sys/class/net/} + ip addr flush dev "${netdev}" + ip link set "${netdev}" down + done elif [ "${copy_resolvconf}" != "n" ] && [ -f /etc/resolv.conf ]; then cp /etc/resolv.conf /new_root/etc/resolv.conf fi |
