snmpd fails to upgrade

Bug #589056 reported by Martin Hagelin
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
net-snmp (Ubuntu)
Fix Released
High
Dustin Kirkland 

Bug Description

When upgrading snmpd, I get the following error:

dpkg: error processing snmpd (--configure):
 subprocess installed post-installation script returned error exit status 128
Errors were encountered while processing:
 snmpd

I had the same problem with the previous upgrade of snmpd and I was able to fix it by changing the snmpd.postinst file. I moved the two lines for confmodule to the beginning of the file, see patch below.

Now it works.

//Martin

------------------------------------

--- snmpd.postinst.org 2010-04-25 21:48:18.000000000 +0200
+++ snmpd.postinst 2010-06-03 09:26:52.000000000 +0200
@@ -2,6 +2,9 @@

 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
@@ -15,9 +18,6 @@
  rm -f /etc/rc0.d/K20snmpd /etc/rc6.d/K20snmpd
 fi

-. /usr/share/debconf/confmodule
-db_version 2.0
-
 # Automatically added by dh_installinit
 if [ -x "/etc/init.d/snmpd" ]; then
  update-rc.d snmpd start 20 2 3 4 5 . stop 20 1 . >/dev/null

----------------------------------------

System:
Description: Ubuntu 10.04 LTS
Release: 10.04

Package:
martin@ella:/var/lib/dpkg/info$ apt-cache policy snmpd
snmpd:
  Installed: 5.4.2.1~dfsg0ubuntu1-0ubuntu2.1
  Candidate: 5.4.2.1~dfsg0ubuntu1-0ubuntu2.1
  Version table:
 *** 5.4.2.1~dfsg0ubuntu1-0ubuntu2.1 0
        500 http://se.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
        500 http://security.ubuntu.com/ubuntu/ lucid-security/main Packages
        100 /var/lib/dpkg/status
     5.4.2.1~dfsg0ubuntu1-0ubuntu2 0
        500 http://se.archive.ubuntu.com/ubuntu/ lucid/main Packages

Revision history for this message
Christian Reis (kiko) wrote :

I've run into this problem and applied the change as a workaround -- and it allowed the installation to succeed.

Changed in net-snmp (Ubuntu):
status: New → Confirmed
Revision history for this message
Jorge Allyson Azevedo (allyson-land) wrote :

Actually I think there are two problems with this package:

1) When upgrading it does not stop the snmpd daemon and when it tries to recreate the user snmp it fails ( see https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/573391 )

2) The problem reported here

In my case I had to stop the daemon and then apply the modification on the snmpd.postinst file. Only then the upgrade was sucessfully applied.

Changed in net-snmp (Ubuntu):
importance: Undecided → High
status: Confirmed → In Progress
assignee: nobody → Dustin Kirkland (kirkland)
Changed in net-snmp (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package net-snmp - 5.4.2.1~dfsg0ubuntu1-0ubuntu4

---------------
net-snmp (5.4.2.1~dfsg0ubuntu1-0ubuntu4) maverick; urgency=low

  * debian/snmpd.postinst: source debconf before doing work, LP: #589056
  * debian/snmp.preinst, debian/snmp.prerm: kill any/all processes owned by
    snmp user before install/uninstall, LP: #573391
 -- Dustin Kirkland <email address hidden> Tue, 22 Jun 2010 14:04:48 -0500

Changed in net-snmp (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.