preinst is in lire 2:2.1.1-2.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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | #!/bin/sh -e
# preinst script for lire
#
# $Id: lire.preinst,v 1.13 2009/03/15 07:00:41 vanbaal Exp $
#
# see: dh_installdeb(1)
# 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>
#
# For details see /usr/share/doc/packaging-manual/
case "$1" in
install|upgrade)
. /usr/share/debconf/confmodule
# convert old non-'lire' user to lire
db_get lire/lire_user_not_lire || true
lire_user_not_lire="$RET"
if test x"$lire_user_not_lire" = x"true"
then
db_set lire/use_existing_user true
db_fset lire/use_existing_user seen true
db_set lire/use_existing_group true
db_fset lire/use_existing_group seen true
if grep "^lire:" /etc/passwd >/dev/null 2>&1
then
echo "User 'lire' already exists while name conversion was requested."
exit 1
fi
if grep "^lire:" /etc/group >/dev/null 2>&1
then
echo "Group 'lire' already exists while group conversion was requested."
exit 1
fi
fi
if grep "^lire:" /etc/group >/dev/null
then
:
else
addgroup --system --quiet lire
db_set lire/use_existing_group true || true
db_fset lire/use_existing_group seen true || true
fi
if grep "^lire:" /etc/passwd >/dev/null
then
:
else
# homedir will contain tmpfiles and maildir for emails containing logs
# explicitly state group: possibly overwrite adduser.conf setting.
adduser --system --disabled-password --shell /bin/sh \
--ingroup lire --no-create-home --home /var/lib/lire \
--gecos "Lire" --quiet lire
db_set lire/use_existing_user true || true
db_fset lire/use_existing_user seen true || true
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
|