2 # Upgrade from lenny to squeeze
6 /etc/init.d/samhain stop
11 /etc/init.d/exim4 stop &&
12 mv /etc/rc2.d/S20exim4 /etc/rc2.d/K20exim4 # so it stays down
15 install deborphan, clean up
17 apt-get install deborphan dialog
24 purge removed packages
26 dpkg --get-selections | awk '$2=="deinstall" {print $1}'
27 echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'`
28 echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
30 change sources list entries to squeeze:
32 cd /etc/apt/sources.list.d && sed -i "s#lenny#squeeze#g" debian.list
40 apt-get install locales-all
47 reject changes to /etc/pam.d/sudo (puppet will install a new file later anyway)
49 reject changes to /etc/munin/plugin-conf.d/munin-node (puppet will install a new file later anyway)
51 * keep local (i.e. reject (N)):
52 * all changes relating to exim (in /etc/exim4 and in logrotate)
54 * /etc/nagios/nrpe.cfg
55 * /etc/samhain/samhainrc
56 * /etc/munin/munin-node.conf
57 * /etc/logrotate.d/apache2
58 * /etc/apache2/apache2.conf
59 * /etc/apache2/ports.conf
61 update nagios.git (add host to squeeze hostgroup)
63 update dsa-puppet.git (add to squeeze list in local.yaml)
69 upgrade once more (security etc)
71 apt-get update && apt-get dist-upgrade
77 check for obsolete packages
79 /usr/lib/nagios/plugins/dsa-check-packages
89 purge removed packages
91 dpkg --get-selections | awk '$2=="deinstall" {print $1}'
92 echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'`
93 echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
99 mv /etc/rc2.d/K20exim4 /etc/rc2.d/S20exim4
100 env -i /etc/init.d/exim4 start
103 ### Problems with CCISS
105 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.