flush and set down only if boot interface is known
Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
parent
ca288915c0
commit
a9e7b0d50b
@ -52,8 +52,10 @@ run_latehook () {
|
|||||||
[[ -z "${copy_resolvconf}" ]] && copy_resolvconf="y"
|
[[ -z "${copy_resolvconf}" ]] && copy_resolvconf="y"
|
||||||
|
|
||||||
if [[ "${copytoram}" == "y" ]]; then
|
if [[ "${copytoram}" == "y" ]]; then
|
||||||
|
if [[ -n "${bootif_dev}" ]]; then
|
||||||
ip addr flush dev "${bootif_dev}"
|
ip addr flush dev "${bootif_dev}"
|
||||||
ip link set "${bootif_dev}" down
|
ip link set "${bootif_dev}" down
|
||||||
|
fi
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user