Triggers are used to generate actions when files are installed or removed from the system. Typically such actions are needed to maintain caches or lists of components installed. Examples for such use are the need to run ldconfig after new libraries have been installed. The need to run install-info if new info files become available and are deployed in /usr/info or the running of update-rc.d after a new startup script for a service becomes available in /etc/init.d.
A special T record in the package description allows this functionality. TheT record takes the name of the directory to monitor and then the script to execute. If the package manager deploys new files in this directory then the script is called with:
script add list of filenames addedThe script can then take the appropriate measures to do whatever actions are necessary. If file are removed from the directory during package removal or upgrade then the script is invoked with:
script remove list of files removedbefore the files are actually removed.