2 # Upgrade from squeeze to wheezy
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
19 service samhain stop &&
20 prio=$(ls -1 S*samhain | cut -b 2-3); mv S${prio}samhain K${prio}samhain # so it stays down
27 prio=$(ls -1 S*exim4* | cut -b 2-3); mv S${prio}exim4 K${prio}exim4 # so it stays down
30 install deborphan, clean up
33 apt-get install deborphan dialog
39 purge removed packages
41 dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
42 echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
43 echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
45 change sources list entries to wheezy:
47 cd /etc/apt/sources.list.d && sed -i "s#squeeze#wheezy#g" debian.list && sed -i "s#squeeze#wheezy#g" volatile.list && sed -i "s#squeeze#wheezy#g" security.list
55 apt-get install locales-all apt dpkg base-files
57 answer question to libc6 "Restart services automaticaly" with "yes"
59 answer "Yes" to changes of /etc/default/rcS, [BR#694928](http://bugs.debian.org/694928)
60 and change "FSCKFIX=yes" afterwards, at least on hardware without remote access (like arm*)
66 use dash as system shell (/bin/sh).
68 reject changes to /etc/pam.d/sudo (puppet will install a new file later anyway)
70 reject changes to /etc/munin/plugin-conf.d/munin-node (puppet will install a new file later anyway)
72 * keep local (i.e. reject (N)):
73 * all changes relating to exim (in /etc/exim4 and in logrotate)
74 * /etc/nagios/nrpe.cfg
76 * /etc/puppet/puppet.conf
78 * /etc/samhain/samhainrc
79 * /etc/munin/munin-node.conf
80 * /etc/logrotate.d/apache2
81 * /etc/apache2/apache2.conf
82 * /etc/apache2/ports.conf
84 * install new version:
85 * /etc/init.d/stunnel4
87 update dsa-nagios.git (add host to wheezy hostgroup)
91 puppetd -t; puppetd -t
93 upgrade once more (security etc)
95 apt-get update && apt-get dist-upgrade
104 check for unneeded/obsolete packages
108 /usr/lib/nagios/plugins/dsa-check-packages
110 purge removed packages
112 dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
113 echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
114 echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
116 purge cruft that upgrade doesn't remove
118 apt-get remove --purge emacs22-common libxmlrpc-ruby libcap1 emacs22-nox emacs22-bin-common libvolume-id0 gcc-4.2-base ifenslave libopenssl-ruby1.8 mailx
124 re-enable exim, samhain
126 mv /etc/rc2.d/K??exim4 /etc/rc2.d/S02exim4
127 mv /etc/rc2.d/K??samhain /etc/rc2.d/S02samhain
128 env -i /etc/init.d/exim4 start
129 env -i /etc/init.d/samhain start