X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=myfai-chboot-local;h=f46c32d9308c33a4277402cd6a9e1818848708aa;hp=49ee6f6efcb6c9ce9ad67d7f30fee83fab3f35c7;hb=527f50b38e4a94a771215131cafe016a97ba83cd;hpb=c47175685b348735b3440e16851dde2cc39b6f3f diff --git a/myfai-chboot-local b/myfai-chboot-local index 49ee6f6..f46c32d 100755 --- a/myfai-chboot-local +++ b/myfai-chboot-local @@ -35,6 +35,11 @@ e() { host=$1 +rm -f /srv/tftp/fai/pxelinux.cfg/* +if [[ ! $1 ]]; then + exit 0 +fi + # assuming ipv4, or else we might need to deal with multiple addresses # in an ipv4 + ipv6 network. my_ip=$(ip -4 route get 8.8.8.8 | sed -nr 's,^.*src\s+(\S+).*,\1,p') @@ -88,10 +93,6 @@ else EOF fi -rm -f /srv/tftp/fai/pxelinux.cfg/* -if [[ ! $1 ]]; then - exit 0 -fi # man page doesn't explain this, but this deletes & thus disables