2 # Upgrade from lenny to squeeze
4 Make sure to coordinate with whoever uses the host, be it the buildd
5 operator, the QA team, the ftp team or just announce it if it's a
12 touch NO-DAEMON-PLEASE EXIT-DAEMON-PLEASE && exit
14 now wait for the buildd to quit
18 /etc/init.d/samhain stop &&
19 mv /etc/rc2.d/S19samhain /etc/rc2.d/K19samhain # and stay down
24 /etc/init.d/exim4 stop &&
25 mv /etc/rc2.d/S20exim4 /etc/rc2.d/K20exim4 # so it stays down
28 install deborphan, clean up
30 apt-get install deborphan dialog
38 echo puppet install | dpkg --set-selections &&
39 echo puppet-common install | dpkg --set-selections
41 purge removed packages
43 dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
44 echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
45 echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
47 change sources list entries to squeeze:
49 cd /etc/apt/sources.list.d && sed -i "s#lenny#squeeze#g" debian.list
57 apt-get install locales-all apt dpkg
63 use dash as system shell (/bin/sh).
65 reject changes to /etc/pam.d/sudo (puppet will install a new file later anyway)
67 reject changes to /etc/munin/plugin-conf.d/munin-node (puppet will install a new file later anyway)
69 * keep local (i.e. reject (N)):
70 * all changes relating to exim (in /etc/exim4 and in logrotate)
72 * /etc/nagios/nrpe.cfg
73 * /etc/samhain/samhainrc
74 * /etc/munin/munin-node.conf
75 * /etc/logrotate.d/apache2
76 * /etc/apache2/apache2.conf
77 * /etc/apache2/ports.conf
79 update nagios.git (add host to squeeze hostgroup)
81 update dsa-puppet.git (add to squeeze list in local.yaml)
85 puppetd -t; puppetd -t
87 upgrade once more (security etc)
89 apt-get update && apt-get dist-upgrade
91 if you are moving from a dsa kernel to a debian kernel, add non-free to sources list, then
93 apt-get install firmware-linux
97 apt-get install firmware-bnx2
99 if you are an nfs client, make sure to load the module before boot completes:
101 echo nfs >> /etc/modules
103 if you are an autofs node, make sure to load the module before boot completes:
105 echo autofs4 >> /etc/modules
107 These last two are because autofs in particular lazy loads the modules, and it
108 will happen after we've disabled module loading.
112 dpkg --purge dhcp3-client && apt-get install isc-dhcp-client # mark as non-auto
114 Do the same for grub/grub-pc if you did upgrade-from-grub-legacy
117 upgrade-from-grub-legacy
119 apt-get purge grub &&
120 apt-get install grub-pc
129 check for unneeded/obsolete packages
133 /usr/lib/nagios/plugins/dsa-check-packages
135 purge removed packages
137 dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
138 echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
139 echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
141 purge cruft that upgrade doesn't remove
143 apt-get remove --purge emacs22-common libxmlrpc-ruby libcap1 emacs22-nox emacs22-bin-common libvolume-id0 gcc-4.2-base ifenslave libopenssl-ruby1.8
149 re-enable exim, samhain
151 mv /etc/rc2.d/K02exim4 /etc/rc2.d/S02exim4
152 mv /etc/rc2.d/K02samhain /etc/rc2.d/S02samhain
153 env -i /etc/init.d/exim4 start
154 env -i /etc/init.d/samhain start
162 ### Problems with CCISS
164 On custom kernels in squeeze it seems that udev stopped to create cciss devices, thus in /lib/udev/devices do a /dev/MAKEDEV cciss and reboot.
169 ### mailq plugin no longer works
170 apt-get install nagios-plugins-standard