PDA

View Full Version : removing ldap-account manager


AboSamoor
October 14th, 2007, 05:37 AM
accidentally i found that ldap-account-manager package have to be removed, the problem that removing this package require the restarting of apache2 , which returns errors , so apt-get can't proceed and i can't make any upgrades :(.
i don't have to remove that package , but the problem that i can't unmark from synaptic.
i'm not using apache2 .
so if i can remove that package from the remove list for apt-get, it's OK.
if i can configure apache2 to restart without errors, also it's OK.
if i can make the upgrades and installation with that package problem is remaining , OK,
my target is to make upgrades and installations ...
this is the message error

http://paste.ubuntu-nl.org/40604/

Removing ldap-account-manager ...
* Restarting apache 1.3 web server... [ OK ]
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.1.64 for ServerName
httpd (no pid file) not running
apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.1.64 for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[fail]
invoke-rc.d: initscript apache2, action "restart" failed.
dpkg: error processing ldap-account-manager (--remove):
subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
ldap-account-manager
E: Sub-process /usr/bin/dpkg returned an error code (1)

mlind
October 14th, 2007, 06:56 AM
There's a "invoke-rc.d restart" line somewhere in /var/lib/dpkg/info/ldap-account-manager.postrm script. Comment out/remove it and then try to remove the package.

AboSamoor
October 14th, 2007, 07:10 AM
this is my file i commented the lines and it works :
-----------------------------------------------------------------------
#!/bin/bash

set -e

if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_version 2.0 || [ $? -lt 30 ]

db_get "ldap-account-manager/config-webserver"
webservers="$RET"
restart=""
for server in $webservers; do
server=${server%,}
case "$server" in
apache|apache-perl|apache-ssl|apache2)
rm -f /etc/$server/conf.d/ldap-account-manager
test -x /usr/sbin/$server || continue
restart="$restart $server"
;;
esac
done
db_get "ldap-account-manager/restart-webserver"
#if [ "$RET" = "true" ]; then
# for server in $restart; do
# server=${server%,}
# if [ -x /usr/sbin/invoke-rc.d ]; then
# invoke-rc.d $server restart
#else
# /etc/init.d/$server restart
# fi
#done
#fi
if [ "$1" = "purge" ]; then
rm -r -f /usr/share/ldap-account-manager; rm -r -f /var/lib/ldap-account-manager; fi

if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
db_purge
fi

# Automatically added by dh_installdebconf
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
# End automatically added section


db_stop

fi

exit 0

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