preinst is in mgetty-docs 1.1.36-3.1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #!/bin/bash
# The first version of mgetty-doc shipped with a real doc dir
# rather than a link to mgetty
REAL_DOC="1.1.14-1"
case "$1" in
upgrade)
if /usr/bin/dpkg --compare-versions $2 lt $REAL_DOC &&
test -L /usr/doc/mgetty-docs &&
expr "`ls -ld /usr/doc/mgetty-docs`" : '.* /usr/doc/mgetty-docs -> mgetty$' >/dev/null
then
echo "Removing obsolete /usr/doc/mgetty-docs symlink."
rm -f /usr/doc/mgetty-docs
fi
;;
esac
|