echo 'APT::Install-Recommends 0;' > /etc/apt/apt.conf.d/local-recommends
-* add volatile to sources list and upgrade (at least the archive keyring)
+add volatile to sources list and upgrade (at least the archive keyring)
grep volatile /etc/apt/sources.list || cat >> /etc/apt/sources.list << EOF
deb http://volatile.debian.net/debian-volatile etch/volatile main
apt-get update && apt-get dist-upgrade
-* turn off samhain
+turn off samhain
/etc/init.d/samhain stop
-* maybe turn off exim
+maybe turn off exim
/etc/init.d/exim4 stop
+ mv /etc/rc2.d/S20exim4 /etc/rc2.d/K20exim4 # so it stays down
-* install deborphan, clean up
+install deborphan, clean up
apt-get install deborphan dialog
orphaner
orphaner -a -n
-* purge removed packages
+purge removed packages
dpkg --get-selections | awk '$2!="install" {print $1}'
echo "really purge these [y/N]?"; read ans; [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2!="install" {print $1}'`
-* remove cruft and prepare sources.list update
+remove cruft and prepare sources.list update
rm -f /etc/apt/sources.liste
mkdir -p /etc/apt/sources.list.d
-* change sources list entries to lenny:
+change sources list entries to lenny:
mirror=`cat /etc/apt/sources.list | awk '/debian/ {print $2; exit}'`
echo "Mirror is $mirror"; echo "Fix stuff if this seems wrong"; echo "XXXXXXXXXXXXXXXXXXXXXXX"
echo "## VERIFY THE MIRROR IS CORRECT ##"; read
-* write new sources.list.d/ entries:
+write new sources.list.d/ entries:
(! [ -e /etc/apt/sources.list ] || mv /etc/apt/sources.list /etc/apt/sources.list-oldetch) &&
cd /etc/apt/sources.list.d &&
(! grep restricted /etc/apt/sources.list-oldetch || echo 'deb http://db.debian.org/debian-admin lenny-restricted non-free' >> debian.org.list )
-* add bpo key
+add bpo key
apt-key add - << EOF
-----BEGIN PGP PUBLIC KEY BLOCK-----
EOF
-* update apt list
+update apt list
apt-get update
-* upgrade
+upgrade
apt-get install locales-all
-* rest follows
+rest follows
apt-get dist-upgrade
- * merge changes into /etc/pam.d/sudo
+reject changes to /etc/pam.d/sudo (puppet will install a new file later anyway)
- (change old and reject (N))
- cat >> /etc/pam.d/sudo << EOF
-
- session required pam_permit.so
- session required pam_limits.so
- EOF
-
- * merge changes into /etc/munin/plugin-conf.d/munin-node
-
- (change new and accept (A))
+merge changes into /etc/munin/plugin-conf.d/munin-node (change new and accept (A)):
sed -i -e 's/adm$/adm, maillog/' /etc/munin/plugin-conf.d/munin-node.dpkg-new
-
- * keep local (i.e. reject (N))
+ * keep local (i.e. reject (N)):
* all changes relating to exim (in /etc/exim4 and in logrotate)
* /etc/ldap/ldap.conf
* /etc/nagios/nrpe.cfg
* change ServerTokens from "Full" to "ProductOnly" in /etc/apache2/conf.d/security
-* update nagios on samosa (add host to lenny hostgroup)
+update nagios on samosa (add host to lenny hostgroup)
-* maybe install [[puppet|puppet-install]]
+maybe install [[puppet|puppet-setup]]
-* check for obsolete packages
+check for obsolete packages
/usr/lib/nagios/plugins/dsa-check-packages
-* clean up old libs
+clean up old libs
orphaner
orphaner -n
orphaner -a -n
-* purge removed packages
+purge removed packages
dpkg --get-selections | awk '$2!="install" {print $1}'
echo "really purge these [y/N]?"; read ans; [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2!="install" {print $1}'`
+
+possibly reboot
+
+re-enable exim
+
+ mv /etc/rc2.d/K20exim4 /etc/rc2.d/S20exim4
+ env -i /etc/init.d/exim4 start