various bug fixes
[distro-setup] / distro-end
index 7bc1f4ba52df7d07c0bfef217b54b830140eb209..d72adea591e501549cfd1669e4fd6c210dd31fd0 100755 (executable)
@@ -617,7 +617,7 @@ esac
 # s cp -r --parents /etc/openvpn/easy-rsa/keys /p/c/filesystem
 # s chown -R 1000:1000 /p/c/filesystem/etc/openvpn/easy-rsa/keys
 # # kw = kgpe work machine.
-# for host in x2 kw; do
+# for host in x2 x3 kw; do
 # vpn-mk-client-cert -b $host -n home b8.nz 1196
 # dir=/p/c/machine_specific/$host/filesystem/etc/openvpn/client
 # mkdir -p $dir
@@ -911,25 +911,21 @@ Pin-Priority: -100
 Package: *
 Pin: release a=xenial-updates
 Pin-Priority: -100
+
+Package: *
+Pin: release a=xenial-security
+Pin-Priority: -100
 EOF
     s dd of=/etc/apt/sources.list.d/xenial.list 2>/dev/null <<EOF
 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 -
     p update
 
     t=$(mktemp -d)
     cd $t
-    s dd of=/etc/apt/preferences.d/flidas-xenial <<EOF
-Package: debootstrap
-Pin: release a=xenial
-Pin-Priority: 1001
-
-Package: debootstrap
-Pin: release a=xenial-updates
-Pin-Priority: 1001
-EOF
     aptitude download debootstrap
     ex *
     ex data.tar.gz
@@ -1386,7 +1382,7 @@ fi
 # EOF
 #         s systemctl daemon-reload
 #         case $HOSTNAME in
-#             x2|tp)
+#             x2|x3|tp)
 #                 ser enable synergyc@iank
 #                 ser start synergyc@iank ||: # X might not be running yet
 #                 ;;
@@ -1475,6 +1471,15 @@ DEVICESCAN -a -o on -S on -n standby,q $sched \
 
 ########### misc stuff
 
+# make networkmanager use resolvconf instead of its own dnsmasq which
+# conflicts with the normal dnsmasq package.
+f=/etc/NetworkManager/NetworkManager.conf
+m=$(md5sum $f)
+s sed -ri '/ *\[main\]/,/^ *\[[^]]+\]/{/^\s*dns[[:space:]=]/d}' $f
+if [[ $m != $(md5sum $f) ]]; then
+  srestart NetworkManager
+fi
+
 # make my /etc/fonts/conf.d/ get used.
 # I have a new sans-serif font there because the default one
 # displays l and I as the same char, grrrrr.
@@ -1533,9 +1538,9 @@ case $distro in
     # compilers.
     spa unison unison-gtk
     ;;
-arch)
-  spa unison gtk2
-  ;;
+  arch)
+    spa unison gtk2
+    ;;
 esac
 
 case $distro in