restricted-manager 0.23 postinst script fails if group admin already exists

Bug #122892 reported by Roland Dreier
6
Affects Status Importance Assigned to Milestone
restricted-manager (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

Binary package hint: restricted-manager

The restricted-manager 0.23 package has the following in its postinst script:

    addgroup --system --quiet admin

however if the group admin already exists, then that command fails with return code 1 and the whole postinst script dies (at least during my feisty -> gutsy upgrade), which means that upgrading restricted-manager fails.

Probably the postinst script should do something like this instead:

    getent group admin > /dev/null 2>&1 || addgroup --system --quiet admin

Revision history for this message
Gianfranco Liporace (dr.kabuto) wrote :

This same bug happens to me too.

Revision history for this message
Martin Pitt (pitti) wrote :

addgroup seems to not be very consistent about this. Usually it succeeds if the group is already present.

I fixed in bzr head by checking for prior existence manually, thank you!

Changed in restricted-manager:
status: New → Fix Committed
assignee: nobody → pitti
Revision history for this message
Martin Pitt (pitti) wrote :

restricted-manager (0.24) gutsy; urgency=low

  [ Matteo Zandi ]
  * RestrictedManager/lrm_driver.py: load_lrmc_disabled() and
    save_lrmc_disabled() now handle trailing spaces in
    /etc/default/linux-restricted-modules-common. (LP: #122359)
  * RestrictedManager/bcm43xx.py: remove fake firmware file when
    disabling bcm43xx.
  * restricted-manager: Added new class DefaultHandlerMessageDialog that can be
    used to give messages from handlers.

  [ Martin Pitt ]
  * debian/restricted-manager.postinst: Do not call addgroup if the admin
    group already exists. In some corner cases, addgroup fails at this
    condidion. (LP: #122892)
  * Add man/restricted-manager.8: man page for r-m, thanks to Cesare
    Tirabassi! (LP: #128697)
  * restricted-manager: Check for l-r-m-generic package instead of the kernel
    ABI specific one. (LP: #107705)
  * debian/control: Add dependency to l-r-m-{generic,i386} on i386/amd64, since
    r-m does not work without it anyway and it just creates confusion.
  * RestrictedManager/bcm43xx.py: Check if bcm43xx-fwcutter could actually get
    installed before proceeding.
  * RestrictedManager/core.py, install_package(): Check that package is
    actually available; if not, point out that the software source for this
    needs to be enabled. Based on original patch of Matteo, but simplified and
    robustified. (LP: #123061, LP: #124304)

 -- Martin Pitt <email address hidden> Wed, 01 Aug 2007 12:20:55 +0200

Changed in restricted-manager:
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.