2
# postinst script for hinfo
6
# workaround for debconf bug -- save stdin in fd 52 (restore after db_stop)
7
# if we arn't given the chance, try /dev/tty
8
if [ ! "$DEBIAN_HAS_FRONTEND" ]; then
14
. /usr/share/debconf/confmodule
17
configure|reconfigure)
19
for period in daily weekly monthly
21
if [ -x /etc/cron.${period}/hinfo ] ; then
22
if [ -z "$where" ] ; then
25
if cmp /etc/cron.${period}/hinfo /etc/cron.${where}/hinfo
27
rm /etc/cron/${where}/hinfo
30
echo "You have both /etc/cron.${where}/hinfo and /etc/cron.${period}/hinfo" 1>&2
31
echo "One of these should be remvoed" 1>&2
36
db_get hinfo/autoupdate
41
if [ ! "$hinfo_redir" ] ; then
46
if [ ! -z "$where" ] ; then
47
ucf -s /usr/share/hinfo /dev/null /etc/cron.${where}/hinfo
48
if [ -f /etc/cron.${where}/hinfo -a ! -s /etc/cron.${where}/hinfo ]
50
rm /etc/cron.${where}/hinfo
56
if [ ! "$hinfo_redir" ] ; then
61
if [ ! -z "$where" ] ; then
62
ucf -s /usr/share/hinfo /dev/null /etc/cron.${where}/hinfo
63
if [ -f /etc/cron.${where}/hinfo -a ! -s /etc/cron.${where}/hinfo ]
65
rm /etc/cron.${where}/hinfo
68
/usr/sbin/hinfo-update || true
71
db_get hinfo/autoupdateverbose
74
if [ ! "$hinfo_redir" ] ; then
79
if id hinfo >/dev/null 2>&1 ; then : ; else
80
adduser --system --disabled-login --home /var/lib/hinfo hinfo
82
chown -R hinfo /var/lib/hinfo
83
if [ ! -f /etc/cron.${au}/hinfo -a ! -z "$where" ] ; then
84
mv /etc/cron.${where}/hinfo /etc/cron.${au}/hinfo
86
temp=`tempfile -p hinfo -m 0755`
89
if [ -x /usr/sbin/hinfo-update ] ; then
90
su hinfo -s /bin/sh -c '/usr/sbin/hinfo-update -$verb'
93
ucf -s /usr/share/hinfo $temp /etc/cron.${au}/hinfo
94
chmod u+x /etc/cron.${au}/hinfo
96
su hinfo -s /bin/sh -c /usr/sbin/hinfo-update || true
101
abort-upgrade|abort-remove|abort-deconfigure)
106
echo "postinst called with unknown argument \`$1'" >&2
111
# dh_installdeb will replace this with shell code automatically
112
# generated by other debhelper scripts.