Test de migration : ZA/Montréal/MailMontrealVersWheezy

aptitude update ; aptitude safe-upgrade ; aptitude clean
find /etc -name "*.dpkg*" -o -name "*.ucf*"
unset LANG ; mkdir ~/squeeze
cp -a /etc ~/squeeze/
cp -a /var/lib/dpkg ~/squeeze/_var_lib_dpkg
cp -a /var/lib/apt/extended_states ~/squeeze/_var_lib_apt_extended_states
cp -a /var/lib/aptitude/pkgstates ~/squeeze/_var_lib_aptitude_pkgstates
dpkg --audit ; dpkg --get-selections "*" > ~/squeeze/dpkg--get-selections.txt
aptitude search "~ahold" | grep "^.h" ; dpkg --get-selections | grep hold
f="/etc/apt/preferences" ; [ -f "$f" ] && mv "$f" "$f".dpkg-squeeze && touch "$f"
f="/etc/apt/preferences.d" ; [ -d "$f" ] && mv "$f" "$f".dpkg-squeeze && mkdir "$f"
sed -i -e '/proposed-updates/s/^/#/' /etc/apt/sources.list
sed -i -e 's/squeeze/wheezy/' /etc/apt/sources.list
sed -i -e 's| [a-z]+/volatile | wheezy-updates |' -e 's|/volatile|/archive|' /etc/apt/sources.list
sed -i -e '/wheezy-lts/s|^|#|' /etc/apt/sources.list
sed -i -e '/backports/s|backports.debian.org/debian-backports|http.debian.net/debian|' /etc/apt/sources.list
cat /etc/apt/sources.list

==> passer sur debian.ca.auf.org
sed -i -e "s/ftp2.ca.debian.org/debian.ca.auf.org/" /etc/apt/sources.list

f="/etc/mysql/conf.d/local.cnf" ; [ -f "$f" ] && sed -i -e '/^default-character-set/s|^|#|' "$f"
script -t -a  2>~/squeeze/mise-a-niveau-wheezy.time ~/squeeze/mise-a-niveau-wheezy.typescript
apt-get update ; apt-get -o APT::Get::Trivial-Only=true dist-upgrade ; df --si
apt-get upgrade && apt-get clean

Configuration file `/etc/crontab'
Configuration file `/etc/sudoers'
==> adduser mnombre sudo
==> adduser progfou sudo

apt-get install linux-image-amd64 firmware-linux
apt-get install udev
apt-get -o APT::Install-Recommends=false dist-upgrade

mail-montreal:/# apt-get clean ; aptitude search ~i\!~Odebian
i   auf-git-etc                                - suivi de /etc et /usr/local via git                 
i   auf-inventaire-serveur                     - mise en place de l'inventaire automatique d'un serve
i   auf-keyring                                - GnuPG archive key of the apt.auf.org repository     
id  libbind9-60                                - BIND9 Shared Library used by BIND                   
id  libboost-iostreams1.42.0                   - Boost.Iostreams Library                             
id  libdb4.7                                   - Berkeley v4.7 Database Libraries [runtime]          
id  libdb4.8                                   - Berkeley v4.8 Database Libraries [runtime]          
id  libdns69                                   - DNS Shared Library used by BIND                     
id  libisc62                                   - ISC Shared Library used by BIND                     
id  libisccc60                                 - Command Channel Library used by BIND                
id  libisccfg62                                - Config File Handling Library used by BIND           
id  liblwres60                                 - Lightweight Resolver Library used by BIND           
i A liblzma2                                   - XZ-format compression library                       
id  libmysqlclient16                           - MySQL database client library                       
i   libssl0.9.8                                - SSL shared libraries                                
id  libtokyocabinet8                           - Tokyo Cabinet Database Libraries [runtime]          
i   linux-image-2.6.32-5-amd64                 - Linux 2.6.32 for 64-bit PCs                         
i   logaricheck                                - Nagios plugin to check disk, memory and swap usage  
i   snmp-mibs-downloader                       - Install and manage Management Information Base (MIB)
mail-montreal:/#  aptitude purge libbind9-60 libboost-iostreams1.42.0 libdb4.7 libdb4.8 libdns69 libisc62 libisccc60 libisccfg62 liblwres60 liblzma2 libmysqlclient16 libssl0.9.8 libtokyocabinet8 snmp-mibs-downloader 
The following packages will be REMOVED:  
  libbind9-60{p} libboost-iostreams1.42.0{p} libdb4.7{p} libdb4.8{p} libdns69{p} libisc62{p} 
  libisccc60{p} libisccfg62{p} liblwres60{p} liblzma2{p} libmysqlclient16{p} libssl0.9.8{p} 
  libtokyocabinet8{p} linux-image-2.6.32-5-amd64{p} snmp-mibs-downloader{p} 
The following partially installed packages will be configured:
  dovecot-common dovecot-core dovecot-imapd dovecot-pop3d 
0 packages upgraded, 0 newly installed, 15 to remove and 1 not upgraded.
Need to get 0 B of archives. After unpacking 123 MB will be freed.
The following packages have unmet dependencies:
 db4.8-util : Depends: libdb4.8 but it is not going to be installed.
The following actions will resolve these dependencies:

     Remove the following packages:
1)     db4.8-util                  

==> supprimer le linux-image-2.6.32-5-amd64 après reboot sur le noyau 3.xx

mail-montreal:/# find /etc -name "*.dpkg*" -o -name "*.ucf*"

mail-montreal:/# rm -rf /etc/apt/preferences.d.dpkg-squeeze
mail-montreal:/# rm /etc/ca-certificates.conf.dpkg-old /etc/default/rcS.dpkg-old /etc/crontab.dpkg-old

==> Nouveau fichier (avec nos modifs)
mail-montreal:/# tar cvzf imap-to-wheezy.tar.gz /etc/default/saslauthd 

mail-montreal:/# colordiff /etc/default/saslauthd.dpkg-old /etc/default/saslauthd
mail-montreal:/# vi /etc/default/saslauthd
==> modifier
mail-montreal:/# rm /etc/default/saslauthd.dpkg-old
mail-montreal:/# auf-inventaire-config
mail-montreal:/# rm /etc/fusioninventory/agent.cfg.ucf-old
mail-montreal:/# vi /etc/rsyslog.conf
==> restreindre les logs depuis *.daemon (sauf *.emerg)
mail-montreal:/# rm /etc/rsyslog.conf.dpkg-old
mail-montreal:/# vi /etc/munin/plugin-conf.d/munin-node
==> modifier (ajouter nbre_msg_secours_a_supprimer)
mail-montreal:/# rm /etc/munin/plugin-conf.d/munin-node.dpkg-old
mail-montreal:/# vi /etc/munin/munin-node.conf
==> modifier (ajouter allow ^10\.36\.4\.3$)

mail-montreal:/# cat << __EOF__ > /etc/sudoers.d/local 

%admin ALL=(ALL:ALL) ALL
%admin ALL=(ALL) NOPASSWD: /usr/bin/git status

mail-montreal:/# rm /etc/sudoers.dpkg-old

correction du problème de dpkg/status qui n'était plus mis à jour

# vérifier les nouveaux paquets qui n'apparaissent pas dans le 'status'
cd /var/lib/dpkg/info ;  for i in `ls *.list`; do pkg="${i%.*}"; pkg="${pkg%:*}" ;  grep "^Package: $pkg" ../status > /dev/null || echo $pkg; done

aptitude install  acpid acpi-support-base console-common console-data console-setup console-terminus console-tools gettext-base   keyboard-configuration klibc-utils libconsole libfreetype6 libklibc libsigc++-2.0-0c2a libstdc++6 libuuid-perl module-init-tools os-prober xkb-data initramfs-tools

apt-get install --no-install-recommends linux-image-amd64 grub-pc

aptitude reinstall lvm2

aptitude install udev