only run pxe late hook if $ip is given
Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
parent
ca85896bfc
commit
51b7ed7f18
1 changed files with 8 additions and 6 deletions
|
@ -47,12 +47,14 @@ run_hook () {
|
||||||
}
|
}
|
||||||
|
|
||||||
run_latehook () {
|
run_latehook () {
|
||||||
[[ -z "${copy_resolvconf}" ]] && copy_resolvconf="y"
|
if [[ -n "${ip}" ]]; then
|
||||||
|
[[ -z "${copy_resolvconf}" ]] && copy_resolvconf="y"
|
||||||
|
|
||||||
if [[ "${copytoram}" == "y" ]]; then
|
if [[ "${copytoram}" == "y" ]]; then
|
||||||
ip addr flush ${bootif_dev}
|
ip addr flush ${bootif_dev}
|
||||||
ip link set ${bootif_dev} down
|
ip link set ${bootif_dev} down
|
||||||
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue