postinst is in xfonts-wqy 1.0.0~rc1-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 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | #!/bin/sh
set -e
case "$1" in
configure)
# remove bogus backup directory generated by preinst
rm -rf /etc/X11/fonts/misc/xfonts-wqy.alias.dpkg-* || true
. /usr/share/debconf/confmodule
CONFAVAIL=/etc/fonts/conf.avail
CONFDIR=/etc/fonts/conf.d
db_get xfonts-wqy/enable_wqy
enable_wqy="$RET"
wqy_old_conf="70-debconf-wqy.conf"
wqy_conf="85-xfonts-wqy.conf"
if [ -h $CONFDIR/$wqy_old_conf ]; then
rm -f $CONFDIR/$wqy_old_conf
elif [ -h $CONFDIR/$wqy_conf ]; then
rm -f $CONFDIR/$wqy_conf
fi
if [ "$enable_wqy" = "true" ]; then
ln -s $CONFAVAIL/$wqy_conf $CONFDIR
fi
if [ -x /usr/bin/fc-cache ]; then
echo -n "Regenerating fonts cache... "
HOME=/root fc-cache -f -v 1>/var/log/fontconfig.log 2>&1 || \
(echo "failed; see /var/log/fontconfig.log for more information."; \
exit 1)
echo "done."
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# Automatically added by dh_installxfonts
if which update-fonts-dir >/dev/null 2>&1; then
update-fonts-dir --x11r7-layout misc;update-fonts-alias --include /etc/X11/fonts/misc/xfonts-wqy.alias misc
fi
# End automatically added section
|