export HOSTNAME=$1
fi
-for f in iank-dev htpc treetowl x2 frodo tp li lj demohost; do
+for f in iank-dev htpc treetowl x2 frodo tp li lj demohost kw; do
eval "$f() { [[ $HOSTNAME == $f ]]; }"
done
-has_p() { treetowl || x2 || frodo || tp || demohost; }
+has_p() { ! linode; } # when tp is tracis, then not tp either
has_x() { ! linode; }
linode() { lj || li; }
has_btrfs() { ! linode; }
;;
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
###### link files ###########
# convenient to just do all file linking in one place
-# if it wasn't set already, we could set hostname here
-#echo treetowl | s dd of=/etc/hostname
-#s hostname -F /etc/hostname
-#HOSTNAME=$(hostname)
-
s lnf -T /a/bin /b
s lnf -T /nocow/t /t
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)
EOF
else
tu /etc/fstab <<'EOF'
-treetowl:/k /kr nfs noauto 0 0
+frodo:/k /kr nfs noauto 0 0
EOF
fi
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 "11\r"
+send "\0255\r"
expect eof
exit
EOF
# the first pup command can kill off our /etc/ mod, so rerun this
/a/exe/ssh-emacs-setup
echo "$0: $(date): ending now"
+exit 0