postinst is in snmpd 5.4.3~dfsg-2.4ubuntu1.3.
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 | #! /bin/sh
set -e
. /usr/share/debconf/confmodule
db_version 2.0
if [ "x$1" = xconfigure ]; then
if [ ! `getent group snmp >/dev/null` ]; then
deluser --quiet --system snmp
fi
adduser --quiet --system --group --no-create-home --home /var/lib/snmp snmp
chown -R snmp:snmp /var/lib/snmp
fi
# Remove shutdown and reboot links; this init script does not need them.
if [ "x$2" = x5.4.2.1~dfsg-3ubuntu2 ]; then
rm -f /etc/rc0.d/K20snmpd /etc/rc6.d/K20snmpd
fi
# Automatically added by dh_installinit
if [ -x "/etc/init.d/snmpd" ]; then
if [ ! -e "/etc/init/snmpd.conf" ]; then
update-rc.d snmpd start 20 2 3 4 5 . stop 20 1 . >/dev/null
fi
invoke-rc.d snmpd start || exit $?
fi
# End automatically added section
exit 0
|