Package:   Zoneminder
Version:     1.26.4-dmo1

Zoneminder wouldn't install.  (State is "rH").  I attempted to remove
it but this also failed.

I traced the error to use of an invalid parameter passed to the postrn
script.  The invalid value is "remove" but the script can't handle
that value; it only  handles "purge".

Any attempt I might make to correct it would be a guess (such as
setting the parameter value to "purge" in the script).  Rather than
chance complications, I'm reporting and asking for direction.

Here's the error:
... irrelevant output omitted

0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 10.2 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 157264 files and directories currently installed.)
Removing zoneminder ...
postrm called with unknown argument `remove'
dpkg: error processing zoneminder (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)


Here's the postrm code:
(from /var/lib/dpkg/info/zoneminder.postrm)

#! /bin/sh

set -e

case "$1" in
    purge)
        echo 'delete from user where User="zmuser";' | mysql
--defaults-file=/etc/mysql/debian.cnf mysql
        echo 'delete from db where User="zmuser";' | mysql
--defaults-file=/etc/mysql/debian.cnf mysql
        mysqladmin --defaults-file=/etc/mysql/debian.cnf -f drop zm
    ;;

    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# Automatically added by dh_installinit
if [ "$1" = "purge" ] ; then
        update-rc.d zoneminder remove >/dev/null
fi

# In case this system is running systemd, we make systemd reload the unit files
# to pick up changes.
if [ -d /run/systemd/system ] ; then
        systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section

(I'm interested in maintaining the package if someone is willing to
serve as a mentor.)

- JohnC


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to