7 echo bootstrapping machine...
9 grep 'http://mirror' /etc/apt/sources.list > /dev/null \
10 || pause "Update /etc/apt/sources.list to use mirror before continuing..."
12 # some packages used for initial setup
14 apt-get install sed curl
16 DIST=`lsb_release -si`
17 DISTVERSION=`lsb_release -sc`
19 # we'll be adding emdebian repo if we're on debian
20 if [[ $DIST = "Debian" ]] ; then
21 apt-get install emdebian-archive-keyring
22 cp ./templates/emdebian.list > /etc/apt/sources.list.d/emdebian.list
26 sed "s/<distribution>/$DISTVERSION/" < ./templates/csclub.list > /etc/apt/sources.list.d/csclub.list
27 curl -s http://debian.csclub.uwaterloo.ca/csclub.asc | apt-key add -
29 # add google-chrome ppa
30 echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
31 curl -s https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
33 # lets get inapt going
36 pause "Verify node is correct in pacakges/nodes.ia before continuing..."
40 read -p "ip? 129.97.134." IP_SUFFIX
41 sed "s/_IP_SUFFIX/$IP_SUFFIX/" < ./templates/interfaces > /etc/network/interfaces
44 cp ./templates/nsswitch.conf /etc/nsswitch.conf
47 cp ./templates/ldap.conf /etc/ldap/ldap.conf
48 if [[ $DIST = "Debian" ]] ; then
49 ln -s /etc/ldap/ldap.conf /etc/sudo-ldap.conf
53 cp ./templates/nslcd.conf /etc/nslcd.conf
56 cp ./templates/krb5.conf /etc/krb5.conf
59 cp ./templates/common-account /etc/pam.d/common-account
62 cp ./templates/nfs-common /etc/default/nfs-common
65 cp ./templates/ssh_config /etc/ssh/ssh_config
66 cp ./templates/sshd_config /etc/ssh/sshd_config
68 echo "prompts for root on caffeine..."
69 scp root@caffeine.csclub.uwaterloo.ca:/etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts
70 scp root@caffeine.csclub.uwaterloo.ca:/etc/hosts /etc/hosts
71 scp root@caffeine.csclub.uwaterloo.ca:/etc/ssl/certs/GlobalSign_Intermediate_Root.pem
74 mkdir /music /scratch /users
75 cat ./templates/fstab >> /etc/fstab
78 cp ./templates/.k5login /root/.k5login
80 read -p "Is this an office terminal? " -n 1 -r
81 if [[ $REPLY =~ ^[Yy]$ ]]
83 # xscreensaver kills machines, redirect to gnome-screensaver
84 cp ./templates/xscreensaver-command /usr/local/bin/xscreensaver-command
87 cp ./templates/ncmpc /usr/local/bin/ncmpc
90 rm /etc/pkcs11/modules/gnome-keyring.module
93 cp ./templates/lightdm.conf /etc/lightdm/lightdm.conf
94 cp ./templates/users.conf /etc/lightdm/users.conf
96 # set novelty background
97 cp -r ./templates/backgrounds /usr/local/share/backgrounds
98 sudo -u lightdm dbus-launch gsettings set com.canonical.unity-greeter background /usr/local/share/backgrounds/current.jpg
101 echo bootstrapping complete
102 echo generate or copy the krb5.keytab for this machine and put it in /etc/krb5.keytab
103 echo verify configuration and then reboot