X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Ffiles%2Fetc%2Frc.local%2FFAISERVER;fp=fai%2Fconfig%2Ffiles%2Fetc%2Frc.local%2FFAISERVER;h=fddf54aae51e8b8687687efe38a9a549afbda86a;hb=7ade5e2c6113530c5f99cfc95880897fcb479f39;hp=e70fae952205b7e5689cd19881a7e745060faa04;hpb=0f532bb1fcccbef349748700040318f882a2ac40;p=automated-distro-installer diff --git a/fai/config/files/etc/rc.local/FAISERVER b/fai/config/files/etc/rc.local/FAISERVER index e70fae9..fddf54a 100755 --- a/fai/config/files/etc/rc.local/FAISERVER +++ b/fai/config/files/etc/rc.local/FAISERVER @@ -10,8 +10,10 @@ GREEN='\E[32m' set -o pipefail # setup network -nic=$(awk '/iface/ {print $2}' /etc/network/interfaces |egrep -v ^lo) -ifup $nic +nic=$(cat /etc/network/interfaces /etc/network/interfaces.d/* 2>/dev/null | awk '$1 == "iface" && $2 != "lo" {print $2; exit}') +if [ -n "$nic" ]; then + ifup $nic +fi # regenerate ssh_host keys ls /etc/ssh/ssh_host_* > /dev/null if [ $? -ne 0 ]; then