Package: snmpd Version: 5.2.2-3 Severity: serious Tags: patch hi,
When i try to purge snmpd, i get this error :
The following packages will be REMOVED:
snmpd{p}
0 packages upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
Need to get 0B of archives. After unpacking 979kB will be freed.
Do you want to continue? [Y/n/?]
Writing extended state information... Done
(Reading database ... 229562 files and directories currently installed.)
Removing snmpd ...
Stopping network management services: snmpd snmptrapd.
Purging configuration files for snmpd ...
dpkg: error processing snmpd (--purge):
subprocess post-removal script returned error exit status 2
Errors were encountered while processing:
snmpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
After some investigations, it seems this error is caused by the first
block if [ $1 = purge ] ... fi which seems to be run twice:
Purge des fichiers de configuration de snmpd ...
+ set -e
+ '[' purge = purge ']'
+ rm -f /var/lib/snmp/snmpd.conf
+ rm -f '/var/lib/snmp/snmptrapd.conf*'
+ rm -f /var/run/agentx
+ rm -f /var/run/snmpd.pid
+ rm -f /var/run/snmptrapd.pid
+ deluser --quiet --system snmp
+ '[' purge = purge ']'
+ '[' -e /usr/share/debconf/confmodule ']'
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/snmpd.postrm
purge
+ set -e
+ '[' purge = purge ']'
+ rm -f '/var/lib/snmp/snmpd.conf*'
+ rm -f '/var/lib/snmp/snmptrapd.conf*'
+ rm -f /var/run/agentx
+ rm -f /var/run/snmpd.pid
+ rm -f /var/run/snmptrapd.pid
+ deluser --quiet --system snmp
I would suggest that you should move the first if ... fi block under the
#DEBHELPER# reference.
After a quick test, it seems to work well with this change.
Cheers.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-k7
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Versions of packages snmpd depends on:
ii adduser 3.87 Add and remove users and groups
ii debconf 1.5.1 Debian configuration management sy
ii libc6 2.3.6-15 GNU C Library: Shared libraries
ii libsensors3 1:2.10.0-7 library to read temperature/voltag
ii libsnmp9 5.2.2-3 NET SNMP (Simple Network Managemen
ii libwrap0 7.6.dbs-9 Wietse Venema's TCP wrappers libra
snmpd recommends no packages.
--
Si Dieu avait voulu que l'homme comprenne la femme,
il n'aurait pas créé l'aspirine.
pgpVhmA0wIjlZ.pgp
Description: PGP signature

