various fixes
[distro-setup] / distro-end
index 41b9104d436fa75d6d960e1d7cb78e528957cb1f..d51cbef4eb10ef72fc2c623c5a234c94ebb1d46a 100755 (executable)
@@ -73,7 +73,6 @@ case $distro in
     ;;
 esac
 
-
 # disable motd junk.
 case $distro in
   debian)
@@ -119,6 +118,9 @@ if isdeb; then
   # docker eats up a fair amount of cpu when doing nothing, so don't enable it unless
   # we really need it.
   pi-nostart docker-ce
+  # and docker is even more crap, it ignores that it shouldnt start
+  ser stop docker
+  ser disable docker
   case $HOSTNAME in
     li|lj)  sgo docker ;;
   esac
@@ -171,6 +173,8 @@ case $HOSTNAME in
     ;;
 esac
 
+pi ${p1[@]}
+
 # website setup
 case $HOSTNAME in
   lj|li)
@@ -568,8 +572,13 @@ esac
 
 ########### end section including li/lj ###############
 
-pi ${p4[@]} $(apt-cache search ruby[.0-9]+-doc| awk '{print $1}')
+# depends gcc is a way to install suggests. this is apparently the only
+# way to install suggests even if the main package is already
+# installed. reinstall doesn't work, uninstalling can cause removing
+# dependent packages.
+pi ${pall[@]} $(apt-cache search ruby[.0-9]+-doc| awk '{print $1}') $(apt-cache depends gcc|grep -i suggests:| awk '{print $2}')
 
+sgo fsf-vpn-dns-cleanup
 
 case $distro in
   trisquel|ubuntu)
@@ -707,10 +716,9 @@ fi
 
 case $distro in
   debian|trisquel|ubuntu)
-    # suggests because we want the resolvconf package. however, i install it earlier
-    # as well, so this is redundant.
+    # suggests resolvconf package. installing it here is redundant, but make sure anyways.
     # todo: check other distros to make sure it\'s installed
-    pi-nostart --install-suggests openvpn
+    pi-nostart openvpn resolvconf
     # pi-nostart does not disable
     ser disable openvpn
     ;;
@@ -903,6 +911,7 @@ esac
 case $(debian-codename) in
   # needed for debootstrap scripts for fai since fai requires debian
   flidas)
+    curl http://archive.ubuntu.com/ubuntu/project/ubuntu-archive-keyring.gpg | s apt-key add -
     s dd of=/etc/apt/preferences.d/flidas-xenial <<EOF
 Package: *
 Pin: release a=xenial
@@ -921,8 +930,8 @@ deb http://us.archive.ubuntu.com/ubuntu/ xenial main
 deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main
 deb http://us.archive.ubuntu.com/ubuntu/ xenial-security main
 EOF
-    curl http://archive.ubuntu.com/ubuntu/project/ubuntu-archive-keyring.gpg | s apt-key add -
 
+    s apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
     s dd of=/etc/apt/preferences.d/flidas-bionic <<EOF
 Package: *
 Pin: release a=bionic
@@ -937,17 +946,35 @@ Pin: release a=bionic-security
 Pin-Priority: -100
 EOF
 
-    # this will be needed if we want to pin something,
-    # but until then, better off disabled
-#     s dd of=/etc/apt/sources.list.d/bionic.list 2>/dev/null <<EOF
-# deb http://us.archive.ubuntu.com/ubuntu/ bionic main
-# deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main
-# deb http://us.archive.ubuntu.com/ubuntu/ bionic-security main
-# EOF
+    # better to run btrfs-progs which matches our kernel version
+    # (note, renamed from btrfs-tools)
+    s dd of=/etc/apt/preferences.d/btrfs-progs <<EOF
+Package: btrfs-progs libzstd1
+Pin: release a=bionic
+Pin-Priority: 1005
+
+Package: *
+Pin: release a=bionic-updates
+Pin-Priority: 1005
+
+Package: *
+Pin: release a=bionic-security
+Pin-Priority: 1005
+EOF
+
+
+    # this will be needed if we want to pin something, generally useful for investigating
+    s dd of=/etc/apt/sources.list.d/bionic.list 2>/dev/null <<EOF
+deb http://us.archive.ubuntu.com/ubuntu/ bionic main
+deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main
+deb http://us.archive.ubuntu.com/ubuntu/ bionic-security main
+EOF
 
 
     p update
 
+    pi btrfs-progs
+
     t=$(mktemp -d)
     cd $t
     aptitude download debootstrap/xenial