2 # Upgrade from etch to lenny
6 echo 'Acquire::PDiffs "false";' > /etc/apt/apt.conf.d/local-pdiff
7 echo 'APT::Install-Recommends 0;' > /etc/apt/apt.conf.d/local-recommends
10 add volatile to sources list and upgrade (at least the archive keyring)
12 grep volatile /etc/apt/sources.list || cat >> /etc/apt/sources.list << EOF
13 deb http://volatile.debian.net/debian-volatile etch/volatile main
15 apt-get update && apt-get dist-upgrade
20 /etc/init.d/samhain stop
25 /etc/init.d/exim4 stop
26 mv /etc/rc2.d/S20exim4 /etc/rc2.d/K20exim4 # so it stays down
29 install deborphan, clean up
31 apt-get install deborphan dialog
38 purge removed packages
40 dpkg --get-selections | awk '$2!="install" {print $1}'
41 echo "really purge these [y/N]?"; read ans; [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2!="install" {print $1}'`
44 remove cruft and prepare sources.list update
46 rm -f /etc/apt/sources.liste
47 mkdir -p /etc/apt/sources.list.d
50 change sources list entries to lenny:
52 mirror=`cat /etc/apt/sources.list | awk '/debian/ {print $2; exit}'`
53 echo "Mirror is $mirror"; echo "Fix stuff if this seems wrong"; echo "XXXXXXXXXXXXXXXXXXXXXXX"
54 echo "## VERIFY THE MIRROR IS CORRECT ##"; read
57 write new sources.list.d/ entries:
59 (! [ -e /etc/apt/sources.list ] || mv /etc/apt/sources.list /etc/apt/sources.list-oldetch) &&
60 cd /etc/apt/sources.list.d &&
61 cat > backports.org.list << EOF &&
62 deb http://debian.sil.at/backports.org/ lenny-backports main
64 sed -e "s#@@MIRROR@@#$mirror#g" > debian.list << EOF &&
65 deb @@MIRROR@@ lenny main
67 cat > debian.org.list << EOF &&
68 deb http://db.debian.org/debian-admin lenny main
70 cat > security.list << EOF &&
71 deb http://security.us.debian.org/ lenny/updates main
73 cat > volatile.list << EOF &&
74 deb http://volatile.debian.org/debian-volatile lenny/volatile main
76 (! [ -e /etc/apt/preferences ] || mv /etc/apt/preferences /etc/apt/preferences-oldetch) &&
77 cat > /etc/apt/preferences << EOF &&
79 Pin: release o=Backports.org archive
82 (! grep restricted /etc/apt/sources.list-oldetch || echo 'deb http://db.debian.org/debian-admin lenny-restricted non-free' >> debian.org.list )
88 -----BEGIN PGP PUBLIC KEY BLOCK-----
89 Version: GnuPG v1.4.9 (GNU/Linux)
91 mQGiBEMIgw4RBADueqAzlq+rQT9JYSSWnNzo6C+9crI8lzW/fcl2Q3PO97MOQTOx
92 Qsf/lOh0Ku7O+VdBa+BwVPuUkSw6wTY5Ku1y/6r1BQzJ9oHkryDDJXsHzKhpdyFc
93 /lD4hNGqRkiNg5ulwAI0O1eqffPWDmeR9ZzSsqM40f1U4TNLfPAu1viWxwCgnbWz
94 onY6RqSYlRsDQaPsNTwieVEEAJeX2FGgNepD1SvfEremAkWCrYYlSZI76iTIf6bd
95 kGkWqIT0vJyE2MNenhDJ2ebbHJVFmL9x8S3m1daC4Zwnacm7aoCY/QgMJ+Js1Fex
96 Acev48W9KHgpVbFMd1t8KAwRbmFcQf0C/FZUbE7xScpTxS4z3SsMOuRyfnGpDOi6
97 m/SnA/9wpquf3pPwbPykzKWNJEDouiJgt0zaFLauKDPeyTWeJ6htaAPDglArewdq
98 bJ9M8QgLFtzjhg/fBQlRRUk7YP4OYtp1OdPkg2D/1rPQNySWlDf21T3N/K8ydKhR
99 bYi+AsPuJLQUi3d+lVTFOebaL9felePvDC2/Eod7PSD1/rnkZ7Q0QmFja3BvcnRz
100 Lm9yZyBBcmNoaXZlIEtleSA8ZnRwLW1hc3RlckBiYWNrcG9ydHMub3JnPohGBBAR
101 AgAGBQJDgImkAAoJEHFe1qB+e4rJ2x4An2oI4xJpDvOx8uDIo9ihG1M0MpUqAJ9S
102 cqVUmiyYSPtu8MwcZecy9kmOIYheBBMRAgAeBQJDCIMOAhsDBgsJCAcDAgMVAgMD
103 FgIBAh4BAheAAAoJEOqOiyEWuhNsDt4AniaEBvlr4oVFMrGgPiye7iE/jv68AJ48
104 OkIfwcKJt7N8ImPAboeimFvWgIheBBMRAgAeBQJDCIM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8cXZox9tQmlOIZ6gDeH1YvFf7ObRLxULm
121 7C6hwik6agtXWkNABVXSxM6MB4hcP9QC+FEhK6y/7wC3SyNRBuFujDG1aohJBBgR
122 AgAJBQJDCIMRAhsMAAoJEOqOiyEWuhNsVVMAoJ1gbL0PHVf7yDwMjO3HuJBErxLd
123 AJ4v9ojJnvJu2yUl4W586soBm+wsLg==
125 -----END PGP PUBLIC KEY BLOCK-----
136 apt-get install locales-all
144 reject changes to /etc/pam.d/sudo (puppet will install a new file later anyway)
146 merge changes into /etc/munin/plugin-conf.d/munin-node (change new and accept (A)):
148 sed -i -e 's/adm$/adm, maillog/' /etc/munin/plugin-conf.d/munin-node.dpkg-new
150 * keep local (i.e. reject (N)):
151 * all changes relating to exim (in /etc/exim4 and in logrotate)
152 * /etc/ldap/ldap.conf
153 * /etc/nagios/nrpe.cfg
154 * /etc/samhain/samhainrc
155 * /etc/munin/munin-node.conf
156 * merge: /etc/logrotate.d/apache2
157 * take new: /etc/apache2/apache2.conf
158 * maybe take new: /etc/apache2/ports.conf
159 * change ServerTokens from "Full" to "ProductOnly" in /etc/apache2/conf.d/security
162 update nagios on samosa (add host to lenny hostgroup)
164 maybe install [[puppet|puppet-setup]]
166 check for obsolete packages
168 /usr/lib/nagios/plugins/dsa-check-packages
178 purge removed packages
180 dpkg --get-selections | awk '$2!="install" {print $1}'
181 echo "really purge these [y/N]?"; read ans; [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2!="install" {print $1}'`
187 mv /etc/rc2.d/K20exim4 /etc/rc2.d/S20exim4
188 env -i /etc/init.d/exim4 start