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!="install" {print $1}'
27 echo "really purge these [y/N]?"; read ans; [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2!="install" {print $1}'`
29 update dsa-puppet.git (add to squeeze list in local.yaml)
35 change sources list entries to squeeze:
37 mirror=`cat /etc/apt/sources.list.d/debian.list | awk '/debian/ {print $2; exit}'`
38 echo "Mirror is $mirror"; echo "Fix stuff if this seems wrong"; echo "XXXXXXXXXXXXXXXXXXXXXXX"
39 echo "## VERIFY THE MIRROR IS CORRECT ##"; read
42 write new sources.list.d/ entries:
44 cd /etc/apt/sources.list.d && sed -i "s#lenny#squeeze#g" > debian.list
53 apt-get install locales-all
61 reject changes to /etc/pam.d/sudo (puppet will install a new file later anyway)
63 reject changes to /etc/munin/plugin-conf.d/munin-node (puppet will install a new file later anyway)
65 * keep local (i.e. reject (N)):
66 * all changes relating to exim (in /etc/exim4 and in logrotate)
68 * /etc/nagios/nrpe.cfg
69 * /etc/samhain/samhainrc
70 * /etc/munin/munin-node.conf
71 * /etc/logrotate.d/apache2
72 * /etc/apache2/apache2.conf
73 * /etc/apache2/ports.conf
75 update nagios.git (add host to squeeze hostgroup)
77 check for obsolete packages
79 /usr/lib/nagios/plugins/dsa-check-packages
89 purge removed packages
91 dpkg --get-selections | awk '$2!="install" {print $1}'
92 echo "really purge these [y/N]?"; read ans; [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2!="install" {print $1}'`
98 mv /etc/rc2.d/K20exim4 /etc/rc2.d/S20exim4
99 env -i /etc/init.d/exim4 start