X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fscripts%2FIANK%2F11-iank;h=25c0503781e352e9de0d5515a5a7ae599ddcb7dc;hb=12c804a0a2c9e823b2579eb0a6c16acf3e82eef6;hp=99316b84f0f376ad0568537044b66b8be241f12d;hpb=fd75a734a7149cf203553d36270482af37e680da;p=automated-distro-installer diff --git a/fai/config/scripts/IANK/11-iank b/fai/config/scripts/IANK/11-iank index 99316b8..25c0503 100755 --- a/fai/config/scripts/IANK/11-iank +++ b/fai/config/scripts/IANK/11-iank @@ -169,14 +169,32 @@ EOF fi # use networkmanager if this host has wireless. -if [[ $(iw dev) ]]; then +if [[ $(iw dev) || $HOSTNAME == so ]]; then $ROOTCMD bash -xe <$target/etc/NetworkManager/conf.d/10-globally-managed-devices.conf <<'EOF' +[device*] +managed=1 +EOF # in a default desktop install, it looks like netplan creates this file under # run/NetworkManager/conf.d in early boot. @@ -193,7 +211,7 @@ EOF # for running from fai or remote connections, don't kill the internet ethusb_arg=-c fi - if [[ $(dig +short @10.2.0.1 -x 10.2.0.2 2>&1 ||:) == kd.b8.nz. ]] \ + if [[ $(timeout 1 dig +short @10.2.0.1 -x 10.2.0.2 2>&1 ||:) == kd.b8.nz. ]] \ && ip n show 10.2.0.1 | grep . &>/dev/null; then # we are at_home $FAI/distro-install-common/ethusb-static $ethusb_arg