I'm busy setting up a mail relay on Etch 3 Beta, and I decided to have a
look at postfix-policyd. Installing it gave me an error though. Now
when I apt-get install anything, I get the same dpkg error for
postfix-policyd, and trying to remove it give the same problem:
mail:~# dpkg -r postfix-policyd
(Reading database ... 18557 files and directories currently installed.)
Removing postfix-policyd ...
dpkg: error processing postfix-policyd (--remove):
subprocess pre-removal script returned error exit status 10
grep: /etc/postfix-policyd.conf: No such file or directory
Starting Postfix greylisting policy daemon: start-stop-daemon: --start
needs --exec or --startas
Try `start-stop-daemon --help' for more information.
invoke-rc.d: initscript postfix-policyd, action "start" failed.
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 3
Errors were encountered while processing:
postfix-policyd
mail:~#
mail:~# apt-get remove postfix-policyd
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
postfix-policyd
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 336kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 18557 files and directories currently installed.)
Removing postfix-policyd ...
dpkg: error processing postfix-policyd (--remove):
subprocess pre-removal script returned error exit status 10
grep: /etc/postfix-policyd.conf: No such file or directory
Starting Postfix greylisting policy daemon: start-stop-daemon: --start
needs --exec or --startas
Try `start-stop-daemon --help' for more information.
invoke-rc.d: initscript postfix-policyd, action "start" failed.
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 3
Errors were encountered while processing:
postfix-policyd
E: Sub-process /usr/bin/dpkg returned an error code (1)
mail:~#
Any ideas?
Thanks
--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
[ snip: the same dpkg error when trying to "apt-get remove" ]
The first thing that seems to go wrong is that grep cannot find
something in the non-existent file /etc/postfix-policyd.conf. According
to apt-file this package should contain the file
/usr/share/postfix-policyd/postfix-policyd.conf. I would try to copy it
to /etc and hope that this enables dpkg to remove the package.
--
Regards,
Florian
Hi,
I'm not getting the same error any more, but it's still complaining:
mail:~# cp /usr/share/postfix-policyd/postfix-policyd.conf /etc/
mail:~# apt-get remove postfix-policyd
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
postfix-policyd
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 336kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 20229 files and directories currently installed.)
Removing postfix-policyd ...
dpkg: error processing postfix-policyd (--remove):
subprocess pre-removal script returned error exit status 10
Errors were encountered while processing:
postfix-policyd
E: Sub-process /usr/bin/dpkg returned an error code (1)
mail:~#
There isn't anything useful in the logs, so it's difficult to know what
exactly is going wrong.
Thanks
Hans
[...]
We have to identify the problem in the pre-removal script:
/var/lib/dpkg/info/postfix-policyd.prerm
If you don't know shell scripting well enough to figure it out yourself
then tell us which version of the postfix-policyd package is currently
installed on your system. ("dpkg -l postfix-policyd")
--
Regards,
Florian
> We have to identify the problem in the pre-removal script:
> /var/lib/dpkg/info/postfix-policyd.prerm
It looks like this:
#!/bin/sh
set -e
#set -x
. /usr/share/debconf/confmodule
. /usr/share/dbconfig-common/dpkg/prerm.mysql
dbc_go postfix-policyd $@
# Automatically added by dh_installinit
if [ -x "/etc/init.d/postfix-policyd" ]; then
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d postfix-policyd stop || exit $?
else
/etc/init.d/postfix-policyd stop || exit $?
fi
fi
# End automatically added section
I don't see a "dbc_go" command anywhere?
> If you don't know shell scripting well enough to figure it out yourself
> then tell us which version of the postfix-policyd package is currently
> installed on your system. ("dpkg -l postfix-policyd")
My scripting skill is very basic, but enough to get a rough idea of what
most scripts do.
I have postfix-policyd 1.80-2.1
Thanks
Hans
Florian, Thanks. I'll check this out further tomorrow - don't have
access to the box right now. I'm sure apt-get update/upgrade will
eventually fix it, but I've gotten this error before, so I would like to
learn it inside-out.
It is defined in /usr/share/dbconfig-common/dpkg/prerm which is sourced
by /usr/share/dbconfig-common/dpkg/prerm.mysql. Seems to be part of a
general system to help with packages that use databases. Do you have the
latest version of package "dbconfig-common" installed?
[...]
> I have postfix-policyd 1.80-2.1
If all else fails then I myself would be sorely tempted to simply
comment out the "dbc_go" line in the pre-removal script.
--
Regards,
Florian