The correct solution, as stated by the person who logged
the bug, is to modify the postinst to the version below,
by moving the ". /usr/share/debconf/confmodule" line to
the start of the script.
To anyone who is trying unsuccessfully to install snmp:
the way I got it to work was:
1) Edit /var/lib/dpkg/info/snmpd.postinst, as below
2) Run "aptitude reinstall snmpd"
# ----< cut here snmpd.postinst>-----
#! /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
# Automatically added by dh_installinit
if [ -x "/etc/init.d/snmpd" ]; then
update-rc.d snmpd defaults>/dev/null
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d snmpd start || exit $?
else
/etc/init.d/snmpd start || exit $?
fi
fi
# End automatically added section
exit 0
# ----< cut here (end)>-----
--
Lesley Longhurst (previously Walker)
Linux Systems Administrator
Opus International Consultants Ltd
Email [email protected]
Tel +64 4 471 7002, Fax +64 4 473 3017
http://www.opus.co.nz
Level 9 Majestic Centre, 100 Willis Street, PO Box 12 343
Wellington, New Zealand
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]