From 4a9db063c218f3897c17f8da8dbd0b5c1c7955ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 1 Oct 2012 20:50:07 +0200 Subject: [PATCH] Fi: Uninstall not complete --- build/debian/dolibarr.postrm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build/debian/dolibarr.postrm b/build/debian/dolibarr.postrm index 798587317a0..38ebf8399c2 100644 --- a/build/debian/dolibarr.postrm +++ b/build/debian/dolibarr.postrm @@ -180,11 +180,17 @@ case "$1" in # Now run the drop user if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'localhost';\"" ; then - echo postrm Database login $dbuser removed + echo postrm Database login $dbuser@localhost removed else error="Unable to run $mysqlcmd -f -e \"DROP USER '$dbuser'@'localhost';\"" echo postrm $error fi + if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'%';\"" ; then + echo postrm Database login $dbuser@% removed + else + error="Unable to run $mysqlcmd -f -e \"DROP USER '$dbuser'@'%';\"" + echo postrm $error + fi # Now run the drop commands if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then