fi
# use networkmanager if this host has wireless.
-if [[ $(iw dev) ]]; then
+if [[ $(iw dev) || $HOSTNAME == so ]]; then
$ROOTCMD bash -xe <<EOF
apt-get -y install network-manager
EOF
# allow networkmanager to manage interfaces
#https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1638842
- touch $target/etc/NetworkManager/conf.d/10-globally-managed-devices.conf
+ # touch $target/etc/NetworkManager/conf.d/10-globally-managed-devices.conf
+ #
+ # in 24.04, netplan takes over and nm won't automatically connect any
+ # ethernet devices. Ya, man NetworkManager helpfully suggests the
+ # config setting device*.managed=1, but of course that isn't REAL
+ # setting, you go to man NetworkManager.conf and find that every
+ # setting has a section. So what section is that setting in? It
+ # doesn't tell you. You have to figure out that it is implied that a
+ # setting x.y means section x, setting y. Ok, but what section is
+ # device*? that isn't documented in the man page either (at least not
+ # properly). But if you read closely, you can intuit that device* is
+ # likely a valid section and then try it. Might as use this same magic
+ # config file name since it is supposed to exist, but I have no idea
+ # if it is still magic. note: In figuring this out, I also removed
+ # /etc/netplan/*, which seemed to have no effect. dunno if it matters.
+ cat >$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.
# 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