lots of updates, things working
[distro-setup] / distro-begin
index 9ef6891d01f90a68986a1fbef830f47f12e73685..0e61f2b4768840e9834066bed09eb0c39eb9cfd2 100755 (executable)
@@ -175,10 +175,8 @@ case $distro in
         ;;
 esac
 
-if linode; then
-    sudo $sed -i '/^127\.0\.1\.1/d' /etc/hosts
-    echo "127.0.1.1 $HOSTNAME.b8.nz $HOSTNAME" | sudo tee -a /etc/hosts
-fi
+sudo $sed -i '/^127\.0\.1\.1/d' /etc/hosts
+echo "127.0.1.1 $HOSTNAME.b8.nz $HOSTNAME" | sudo tee -a /etc/hosts
 
 
 if [[ $EUID == 0 ]]; then
@@ -331,14 +329,16 @@ Pin-Priority: 500
 EOF
             fi
         fi
-        # for hosts which require nonfree drivers
-        # i previously had extra packages listed here linux-image-amd64
-        # firmware-linux-free linux-headers-amd64, but I
-        # don\'t see any reason why. seems to work in testing without.
-        # remove this note if it continues to work.
-        p=firmware-linux-nonfree
-        if apt-cache show $p &>/dev/null; then
-            pi $p
+        # # no hosts have nonfree firmware anymore, yay. but leaving commented,
+        # # as i might run into one for a little while still.
+        # p=firmware-linux-nonfree
+        # if apt-cache show $p &>/dev/null; then
+        #     pi $p
+        # fi
+        ;;&
+    trisquel|ubuntu)
+        if has_x; then
+            pi abrowser
         fi
         ;;&
     trisquel|ubuntu|debian)
@@ -693,14 +693,16 @@ fi
 # E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
 # E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
 sleep 1
+# todo: this is not idempotent, it fails when running twice, due to prepopulated values.
+# check into unsetting them using debconf-set-selection.
 s apt-get -y install --no-install-recommends expect
-s expect <<EOF
+s expect <<EOF ||:
 set force_conservative 0
 spawn dpkg-reconfigure tzdata -freadline
 expect -nocase timeout {exit 1} "Geographic area:"
-send "12\r"
+send "\02512\r"
 expect -nocase timeout {exit 1} "Time zone:"
-send "5\r"
+send "\0255\r"
 expect eof
 exit
 EOF