chroot: add before/after hooks