-# only restore dchroot part into fstab
-cd /tmp
-afio -iZ -y /etc/fstab $CURBACKUP
-grep -A 200 "^# dchroots" /tmp/etc/fstab >> /etc/fstab
-rm -rf /tmp/etc
+# restore /etc bzr branch, rescue the files we do not want to restore
+# completely
+cd /etc
+if [ ! -d /etc/.bzr ]; then
+ [ -e /backup-etc ] || bzr branch bzr+ssh://martin@piware.de/home/martin/backup/`hostname`-etc /backup-etc
+ cp -av /backup-etc/* /etc/
+ cp -av /backup-etc/.bzr/ /etc/
+ rm -rf /backup-etc
+ chmod 600 /etc/ssh/ssh_*_key
+ chmod 700 /etc/ssl/private
+ chmod 640 /etc/ssl/private/ssl-cert-*
+ chown root:ssl-cert /etc/ssl/private/ssl-cert*
+ echo "none /tmp tmpfs defaults 0 0" >> /etc/fstab
+fi