Skip to content
Snippets Groups Projects
Commit a9e7b0d5 authored by Christian Hesse's avatar Christian Hesse :stuck_out_tongue_winking_eye: Committed by Gerardo Pozzi
Browse files

flush and set down only if boot interface is known


Signed-off-by: default avatarChristian Hesse <mail@eworm.de>
parent ca288915
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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