various fixes
[distro-setup] / distro-end
index 40282d0089bcc2cb4729bb16dd7244a7ebc0badc..8ba5ffdfaf373e2e612071e202aea06277d32844 100755 (executable)
@@ -26,7 +26,6 @@ x=(
     bwm-ng
     chromium
     duplicity
-    fail2ban
     fdupes
     filelight
     gdb
@@ -66,7 +65,6 @@ esac
 
 ####### misc packages ###########
 
-
 case $distro in
     # tk for gitk
     arch) pi git tk ;;
@@ -329,6 +327,11 @@ case $distro in
     # others unknown
 esac
 
+case $distro in
+    arch) pi apg  ;;
+    # already in debian jessie
+esac
+
 ######### end misc packages #########
 
 
@@ -368,6 +371,17 @@ DEVICESCAN -a -o on -S on -n standby,q $sched\
 
 ############# end unfinished
 
+########### misc stuff
+
+if [[ `debian-archive` == stable ]]; then
+    s dd of=/etc/apt/preferences.d/unison-gtk <<'EOF'
+Explanation: Allow unison-gtk to be upgraded
+Package: unison-gtk
+Pin: release a=unstable
+Pin-Priority: 500
+EOF
+fi
+
 case $distro in
     arch)
         # default is alsa, doesn\'t work with with pianobar
@@ -383,7 +397,10 @@ case $distro in
     # others unknown
 esac
 
-if [[ $HOSTNAME == treetowl ]]; then
+if [[ $HOSTNAME == treetowl ]] && [[ `debian-archive` != testing ]]; then
+        # fail2 ban is broken, with a workaround, per
+    # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770171
+    # ill wait a while to see if it gets fixed
     pi fail2ban
     sgo fail2ban
 fi
@@ -432,9 +449,10 @@ Unattended-Upgrade::Origins-Pattern {
 EOF
       if isdebian-testing; then
           cat <<'EOF'
-# for stable, only do security updates.
+# for testing, only do security updates.
        "origin=Debian,codename=${distro_codename},label=Debian-Security";
 EOF
+      else
           cat <<'EOF'
 # These are stable packages only getting bugfixes anyways.
        "origin=*";
@@ -455,13 +473,15 @@ fi
 # but postfix didn't like that
 if [[ ! -L /var/spool/postfix ]]; then
     ser stop postfix
-    if [[ -e /q/postfix ]]; then
+    n=/q/postfix-`distro-name``debian-archive`
+    if [[ -e $n ]]; then
         echo "$0: error: /q/postfix exists but not the link to it"
+        exit 1
     fi
-    s mv /var/spool/postfix /q
-    s lnf /q/postfix /var/spool
+    s mv /var/spool/postfix $n
+    s lnf -T $n /var/spool/postfix
     ser start postfix
-    journalctl -n 20
+    journalctl -n 20 | cat
 fi