postinst is in sysklogd 1.5-6ubuntu1.
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 | #! /bin/sh
set -e
if [ "$1" = "configure" ]
then
case $2 in
1.4.1-18|1.4.1-19|1.4.1-20|1.4.1-21|1.5-1)
chmod 644 /etc/default/syslogd
;;
esac
# Prepare for takeover of the host
if [ -z "$2" ]
then
if [ ! -e /var/log/news ] \
&& grep -q '^[^#].*/var/log/news/' /etc/syslog.conf \
&& grep -q ^news: /etc/passwd \
&& grep -q ^news: /etc/group
then
mkdir /var/log/news
chmod 2755 /var/log/news
chown news:news /var/log/news
fi
# Create logfiles with correct file modes
if [ -z "$2" ]
then
for LOG in `syslogd-listfiles --all`
do
if [ ! -f $LOG ]
then
touch $LOG
fi
chown root:adm $LOG
chmod 640 $LOG
done
fi
fi
if [ -f /etc/init.d/sysklogd -a -n "$2" ]
then
set +e
if [ -x /usr/sbin/invoke-rc.d ]
then
invoke-rc.d sysklogd stop
else
sh /etc/init.d/sysklogd stop
fi
set -e
fi
update-rc.d sysklogd start 10 2 3 4 5 . stop 90 1 . >/dev/null
adduser --system --group --no-create-home --quiet syslog
# restarting daemon
#
if [ -f /etc/init.d/sysklogd ]
then
set +e
if [ -x /usr/sbin/invoke-rc.d ]
then
invoke-rc.d sysklogd start
else
sh /etc/init.d/sysklogd start
fi
set -e
fi
fi
exit 0
|