X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fscripts%2FFAISERVER%2F10-conffiles;h=92b17fc87d6c40d3a2f90f7c8367db6b351494aa;hb=490334746631a6c956eee47947f3ab8f8a451666;hp=812003ba3aeee29788f680bdb2fef45f22474556;hpb=bc3037fe2075e33b0035fc0689f44a60381638f9;p=automated-distro-installer diff --git a/fai/config/scripts/FAISERVER/10-conffiles b/fai/config/scripts/FAISERVER/10-conffiles index 812003b..92b17fc 100755 --- a/fai/config/scripts/FAISERVER/10-conffiles +++ b/fai/config/scripts/FAISERVER/10-conffiles @@ -18,7 +18,9 @@ if [ $FAI_ACTION = "install" -o $FAI_ACTION = "dirinstall" ] ; then ainsl -av /etc/apt/apt.conf.d/02proxy 'Acquire::http::Proxy "http://127.0.0.1:3142";' # create some host entries - myip=$(ip addr show up| grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1 | grep -v 127.0.0.1) + _nic=$(ip route | awk '/^default/ {print $5}'|head -1) + myip=$(ip -br ad sh $_nic | awk '{print $3}') + myip=${myip%/*} ainsl /etc/hosts "$myip faiserver" # that's me ainsl /etc/hosts "192.168.33.100 demohost" ainsl /etc/hosts "192.168.33.101 xfcehost"