[Bug 394755] Re: motion failed to install/upgrade : chown: invalid group: `motion:motion'

Jean-Baptiste Lallement jeanbaptiste.lallement at gmail.com
Sat Nov 21 21:22:28 UTC 2009


The following code in postinst script is buggy and doesn't do what is
expected:

=====
add_group_if_missing() {
    if [ -x /usr/sbin/addgroup ]; then
        if ! id -g motion >/dev/null 2>&1; then
                addgroup --force-badname motion || true
        fi
    fi
}
=====

'id -g' returns the effective group id whatever it is. The goal of this
function should be to test is the group "motion" exists and create it if
it is not the case.

If the group "motion" doesn't exists before the upgrade but the user
"motion" does then this function doesn't create the group and the call
to "chown motion:motion" fails

-- 
motion failed to install/upgrade : chown: invalid group: `motion:motion'
https://bugs.launchpad.net/bugs/394755
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list