various fixes for bullseye and new ssh key changes
[automated-distro-installer] / fai / config / scripts / GRUB_PC / 11-iank
index aaebc82a5593404759132ab4f278a2eaea3b7a5e..ecc093e09153a1c6117d67358b58087c797bdbc4 100755 (executable)
@@ -27,6 +27,7 @@ fi
 fcopy -riB /boot
 # this is also done by FABASE/10-misc by default (without B)
 fcopy -riB /root
+fcopy -riB /usr/local/bin
 
 
 src=$FAI/distro-install-common/shadow
@@ -121,12 +122,12 @@ TimeoutStartSec=20
 WantedBy=dev-disk-by\x2did-ata\x2dSamsung_SSD_870_QVO_8TB_S5VUNG0N900656V.device
 EOF
 
-  chroot $FAI_ROOT bash <<'EOFOUTER'
+        chroot $FAI_ROOT bash <<'EOFOUTER'
 systemctl enable myncq.service
 /usr/bin/myncq no-upgrub
 EOFOUTER
 
-          ;;
+        ;;
       # per rubens suggestion to make a d16 more stable
       kd|kw) cmdline+=" pci=realloc=off" ;;
     esac
@@ -197,6 +198,22 @@ case $HOSTNAME in
 esac
 
 
+# bug fix, somewhere between t9's xorg 1.19.6
+# and 1.20.1-3ubuntu2
+#  xserver-xorg-video-nouveau                 1:1.0.15-3
+# xorg stopped load nouveau
+#  https://www.linuxquestions.org/questions/slackware-14/kernel-modules-conflicting-with-nouveau-driver-4175623867/
+# https://nouveau.freedesktop.org/InstallNouveau.html
+if lspci|grep -q 'GeForce GTX 6[0-9][0-9]\]'; then
+  mkdir -p $target/etc/X11/xorg.conf.d/
+  cat >$target/etc/X11/xorg.conf.d/10-nouveau.conf <<'EOF'
+Section "Device"
+Identifier "Device0"
+Driver "nouveau"
+EndSection
+EOF
+fi
+
 # use networkmanager if this host has wireless.
 if type -p iw &>/dev/null && [[ $(iw dev) ]]; then
   chroot $FAI_ROOT bash <<EOF
@@ -293,7 +310,7 @@ EOF
 ##### end network setup  #####
 
 
-if ifclass VOL_BUSTER_BOOTSTRAP; then
+if ifclass VOL_BULLSEYE_BOOTSTRAP; then
   fcopy /etc/systemd/system/faicheck.service
   chroot $FAI_ROOT bash <<'EOFOUTER'
 systemctl enable faicheck.service
@@ -334,9 +351,9 @@ f=/etc/ssh/sshd_config
 grep -xFq "$line" $f || tee -a $f <<<"$line"
 
 
-# default debian groups (jessie through buster) + adm, sudo, root
-for g in cdrom floppy audio dip video plugdev netdev adm sudo; do
-  if getent gropu $g >/dev/null; then
+# default debian groups (jessie through buster) + adm, sudo, root, admin
+for g in cdrom floppy audio dip video plugdev netdev adm sudo admin; do
+  if getent group $g >/dev/null; then
     usermod -aG $g iank
   fi
 done