t12 related changes
[automated-distro-installer] / fai / config / scripts / IANK / 11-iank
index 99316b84f0f376ad0568537044b66b8be241f12d..d7a5bd3e942b5abfb28eb78fd2888ff1c267002b 100755 (executable)
@@ -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 <<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.