87101be99e13e967071574d95055e3cdef8715f4
[mirror/dsa-wiki.git] / input / howto / upgrade-to-squeeze.mdwn
1
2 # Upgrade from lenny to squeeze
3
4 turn off samhain
5
6         /etc/init.d/samhain stop
7
8
9 maybe turn off exim
10
11         /etc/init.d/exim4 stop
12         mv /etc/rc2.d/S20exim4 /etc/rc2.d/K20exim4 # so it stays down
13
14
15 install deborphan, clean up
16
17         apt-get install deborphan dialog
18         orphaner
19         orphaner -n
20         orphaner -a
21         orphaner -a -n
22
23
24 purge removed packages
25
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}'`
28
29 update dsa-puppet.git (add to squeeze list in local.yaml)
30
31 do a puppet run:
32
33         puppetd -t
34
35
36 change sources list entries to squeeze:
37
38         mirror=`cat /etc/apt/sources.list.d/debian.list | awk '/debian/ {print $2; exit}'`
39         echo "Mirror is $mirror"; echo "Fix stuff if this seems wrong"; echo "XXXXXXXXXXXXXXXXXXXXXXX"
40         echo "## VERIFY THE MIRROR IS CORRECT ##"; read
41
42
43 write new sources.list.d/ entries:
44
45         cd /etc/apt/sources.list.d && sed -i "s#lenny#squeeze#g" > debian.list
46
47 update apt list
48
49         apt-get update
50
51
52 upgrade
53
54         apt-get install locales-all
55
56
57 rest follows
58
59         apt-get dist-upgrade
60
61
62 reject changes to /etc/pam.d/sudo (puppet will install a new file later anyway)
63
64 reject changes to /etc/munin/plugin-conf.d/munin-node (puppet will install a new file later anyway)
65
66  * keep local (i.e. reject (N)):
67   * all changes relating to exim  (in /etc/exim4 and in logrotate)
68   * /etc/ldap/ldap.conf
69   * /etc/nagios/nrpe.cfg
70   * /etc/samhain/samhainrc
71   * /etc/munin/munin-node.conf
72   * /etc/logrotate.d/apache2
73   * /etc/apache2/apache2.conf
74   * /etc/apache2/ports.conf
75
76 update nagios.git (add host to squeeze hostgroup)
77
78 check for obsolete packages
79
80         /usr/lib/nagios/plugins/dsa-check-packages
81
82 clean up old libs
83
84         orphaner
85         orphaner -n
86         orphaner -a
87         orphaner -a -n
88
89
90 purge removed packages
91
92         dpkg --get-selections | awk '$2!="install" {print $1}'
93         echo "really purge these [y/N]?"; read ans; [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2!="install" {print $1}'`
94
95 possibly reboot
96
97 re-enable exim
98
99         mv /etc/rc2.d/K20exim4 /etc/rc2.d/S20exim4
100         env -i /etc/init.d/exim4 start