only run pxe late hook if $ip is given

Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
Christian Hesse 2016-05-24 13:57:08 +02:00 committed by Gerardo Exequiel Pozzi
parent ca85896bfc
commit 51b7ed7f18

View File

@ -47,6 +47,7 @@ run_hook () {
}
run_latehook () {
if [[ -n "${ip}" ]]; then
[[ -z "${copy_resolvconf}" ]] && copy_resolvconf="y"
if [[ "${copytoram}" == "y" ]]; then
@ -55,4 +56,5 @@ run_latehook () {
elif [[ "${copy_resolvconf}" != "n" && -f /etc/resolv.conf ]]; then
cp /etc/resolv.conf /new_root/etc/resolv.conf
fi
fi
}