Commit a9e7b0d5 authored by Christian Hesse's avatar Christian Hesse 😜 Committed by Gerardo Exequiel Pozzi
Browse files

flush and set down only if boot interface is known



Signed-off-by: Christian Hesse's avatarChristian Hesse <mail@eworm.de>
parent ca288915
......@@ -52,8 +52,10 @@ run_latehook () {
[[ -z "${copy_resolvconf}" ]] && copy_resolvconf="y"
if [[ "${copytoram}" == "y" ]]; then
ip addr flush dev "${bootif_dev}"
ip link set "${bootif_dev}" down
if [[ -n "${bootif_dev}" ]]; then
ip addr flush dev "${bootif_dev}"
ip link set "${bootif_dev}" down
fi
elif [[ "${copy_resolvconf}" != "n" && -f /etc/resolv.conf ]]; then
cp /etc/resolv.conf /new_root/etc/resolv.conf
fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment