fix for #212961: bind-chroot doesn't clean up its mess on %preun

This commit is contained in:
Martin Stransky 2006-11-03 15:04:41 +00:00
parent 6766d81e82
commit 5c5cdca146
2 changed files with 21 additions and 0 deletions

View File

@ -279,6 +279,25 @@ function sync_files()
fi;
}
function clean_root()
{
if ! rootdir ; then # chroot is disabled, clean it up
if [ -n "${BIND_CHROOT_PREFIX}" -a "x${BIND_CHROOT_PREFIX}" != "x/" ]; then
rm -r ${BIND_CHROOT_PREFIX}/dev >/dev/null 2>&1 || :;
rmdir ${BIND_CHROOT_PREFIX}/proc >/dev/null 2>&1 || :;
rmdir ${BIND_CHROOT_PREFIX}/etc >/dev/null 2>&1 || :;
rmdir ${BIND_CHROOT_PREFIX}/var/run/named >/dev/null 2>&1 || :;
rmdir ${BIND_CHROOT_PREFIX}/var/run/dbus >/dev/null 2>&1 || :;
rmdir ${BIND_CHROOT_PREFIX}/var/run >/dev/null 2>&1 || :;
rmdir ${BIND_CHROOT_PREFIX}/var/named/slaves >/dev/null 2>&1 || :;
rmdir ${BIND_CHROOT_PREFIX}/var/named/data >/dev/null 2>&1 || :;
rmdir ${BIND_CHROOT_PREFIX}/var/named >/dev/null 2>&1 || :;
rmdir ${BIND_CHROOT_PREFIX}/var/tmp >/dev/null 2>&1 || :;
rmdir ${BIND_CHROOT_PREFIX}/var >/dev/null 2>&1 || :;
fi;
fi;
}
case $1 in
-e|--enable)
enable_bind_chroot;
@ -290,6 +309,7 @@ case $1 in
sync_files;
/bin/umount ${BIND_CHROOT_PREFIX}/proc >/dev/null 2>&1 || :;
/bin/umount ${BIND_CHROOT_PREFIX}/var/run/dbus >/dev/null 2>&1 || :;
clean_root;
exit $?;
;;
-s|--sync)

View File

@ -784,6 +784,7 @@ rm -rf ${RPM_BUILD_ROOT}
- fix for #211282: EDNS is globally enabled, crashing CheckPoint FW-1,
added edns-enable options to named configuration file which can suppress
EDNS in queries to DNS servers (see /usr/share/doc/bind-9.3.3/misc/options)
- fix for #212961: bind-chroot doesn't clean up its mess on %preun
- update to 9.3.3rc3, removed already merged patches
* Fri Oct 13 2006 Martin Stransky <stransky@redhat.com> - 30:9.3.3-5