Skip to content
Snippets Groups Projects
Commit 2c99df5c authored by Francois Dupoux's avatar Francois Dupoux
Browse files

Reset network interfaces at the end of the PXE boot to allow DHCP to run

parent 3160db0e
No related branches found
No related tags found
1 merge request!106Reset network interfaces at the end of the PXE boot to allow DHCP to run (FS#36749)
Pipeline #3246 passed
...@@ -67,10 +67,11 @@ run_latehook () { ...@@ -67,10 +67,11 @@ run_latehook () {
# shellcheck disable=SC2154 # shellcheck disable=SC2154
# defined via initcpio's parse_cmdline() # defined via initcpio's parse_cmdline()
if [ "${copytoram}" = "y" ]; then if [ "${copytoram}" = "y" ]; then
if [ -n "${bootif_dev}" ]; then for curif in /sys/class/net/*; do
ip addr flush dev "${bootif_dev}" netdev=${curif#/sys/class/net/}
ip link set "${bootif_dev}" down ip addr flush dev "${netdev}"
fi ip link set "${netdev}" down
done
elif [ "${copy_resolvconf}" != "n" ] && [ -f /etc/resolv.conf ]; then elif [ "${copy_resolvconf}" != "n" ] && [ -f /etc/resolv.conf ]; then
cp /etc/resolv.conf /new_root/etc/resolv.conf cp /etc/resolv.conf /new_root/etc/resolv.conf
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment