Ticket #1077 (closed defect: fixed)
migration /var/alternc/bind/zones manquante pour certaines versions
| Reported by: | anarcat | Owned by: | anonymous |
|---|---|---|---|
| Priority: | high | Milestone: | alternc-0.9.8 |
| Component: | Package Debian | Version: | alternc-0.9.6.4 |
| Severity: | minor | Keywords: | |
| Cc: |
Description
Le debian/preinst opère une migration des zonefiles de bind vers /var/alternc/bind/zones. Il opère cette migration pour les versions 0.9.3 et antécédantes.
Le problème est que cette migration s'est opérée quelquepart *après* 0.9.3.1 et donc certaines installations pourraient voir cette migration négligée.
Le workaround est de rouler à la main la partie du postinst suivante:
mkdir -p /var/alternc/bind if [ ! -e /var/alternc/bind/automatic.conf -a
-f /etc/bind/automatic.conf ]; then
if [ ! -e /var/alternc/bind/zones ]; then
mkdir -p /var/alternc/bind/zones
fi for zone in `sed -n -e 's,.*/etc/bind/master/(.*)".*,1,p'
/etc/bind/automatic.conf`; do
if [ -f /etc/bind/master/$zone ]; then
mv /etc/bind/master/$zone /var/alternc/bind/zones
fi
done cp -a -f /etc/bind/automatic.conf /var/alternc/bind/automatic.conf sed -e 's,/etc/bind/master,/var/alternc/bind/zones,g'
< /etc/bind/automatic.conf > /var/alternc/bind/automatic.conf
rm /etc/bind/automatic.conf
fi if [ ! -e /var/alternc/bind/slaveip.conf -a
-f /etc/bind/slaveip.conf ]; then
mv /etc/bind/slaveip.conf /var/alternc/bind/slaveip.conf
fi if [ ! -e /etc/bind/templates ]; then
mkdir -p /etc/bind/templates
fi if [ ! -e /etc/bind/templates/named.template -a
-f /etc/bind/domaines.template ]; then
mv /etc/bind/domaines.template /etc/bind/templates/named.template
fi if [ ! -e /etc/bind/templates/zone.template -a
-f /etc/bind/master/domaines.template ]; then
mv /etc/bind/master/domaines.template
/etc/bind/templates/zone.template
fi if [ -f /etc/bind/master/mx.template ]; then
rm /etc/bind/master/mx.template
fi if [ -f /etc/bind/master/slave.template ]; then
rm /etc/bind/master/slave.template
fi
rmdir /etc/bind/master 2> /dev/null echo "/etc/bind/master was not empty. Please remove it manually."

(In [2047]) do the bind zonefiles migration for all versions before 0.9.4 (instead of all before and including 0.9.3), since it's the only known version with that proper configuration. Closes: #1077