Next: mount-umount, Previous: upgrade-commit-pull-push, Up: Scripts [Contents][Index]
These 2 scripts mount and unmount both gitbare and cache directories
into the chroot jail, using the bind option (see man 8 mount
).
They enable or disable remote meta-data upgrades and remote data copies when SERVER
(see Server) respectively start or stop.
Process conceptual model:
# /usr/share/mediatex/scripts/bind.sh
# /usr/share/mediatex/scripts/unbind.sh
from misc (see misc)
bind()
from new-free-clean (see new-free-clean)
unbind()
from init-remove-purge (see init-remove-purge)
function JAIL_bind() { … mount --bind $MDTXHOME/cache $JAIL/var/cache mount --bind $GITBARE $JAIL/var/lib/gitbare … }
see init-remove-purge:
/ |- var/ +- lib/ | +- mediatex/ | +- mdtx/ (1) | +- mdtx/ | |- mdtx.conf,v | +- supports.txt,v +- cache/ +- mediatex/ +- mdtx/ |- cache/ (2) +- jail/ +- var/ |- lib (bind -> 1) |- cache (bind -> 2)
Code:
scripts/bind.sh
scripts/unbind.sh
scripts/lib/jail.sh