preinst is in xtell 2.10.8.
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 56 57 58 59 | #! /bin/sh
# preinst script for xtell
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
if [ -L /usr/bin/write ]; then
rm -f /usr/bin/write
fi
if [ -L /usr/share/man/man1/write.1.gz ]; then
rm -f /usr/share/man/man1/write.1.gz
fi
# if there was an old entry, remove it
update-inetd --remove 'xtell\t.*'
#dpkg-divert --package xtell --remove --rename \
# --divert /usr/bin/write.orig /usr/bin/write
#dpkg-divert --package xtell --remove --rename \
# --divert /usr/share/man/man1/write.orig.1.gz /usr/share/man/man1/write.1.gz
case "$1" in
install|upgrade)
if id xtelld >/dev/null 2>&1 ; then
# We have a xtelld user.
if [ `id xtelld -g -n` != "tty" ] ; then
usermod -g tty xtelld
fi
else
adduser --system --ingroup tty --no-create-home --home /tmp --quiet xtelld
fi
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 0
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
exit 0
|