Bug 7924 - Fix handling of command line arguments in koha-remove
commit491a00f0a221ed53c5d04e4248492e5065d3ca35
authorMagnus Enger <magnus@enger.priv.no>
Mon, 30 Apr 2012 11:49:38 +0000 (30 13:49 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 14 May 2012 12:01:22 +0000 (14 14:01 +0200)
tree28a9d1c2820d71fc6aceced2e8090b09bcb551a3
parent9a309b61bd7c2cb30ede3be93c671edccd835a8b
Bug 7924 - Fix handling of command line arguments in koha-remove

koha-remove would fail with a message like this:
Removing Koha instance --
ERROR 1396 (HY000) at line 1: Operation DROP USER failed for 'koha_--'@'%'

After fixing this, the --keep-mysql option made the script exit without doing
anything.

To test:

Alt 1
- Build package with build-git-snapshot
- Install package

Alt 2
- Replicate the changes in the patch in an existing installation

Then:
- Add instance1 and instance2
- koha-remove instance1
-- Check that script completes and the databse is gone
- koha-remove --keep-mysql instance2
-- Check that the script completes but the database is not removed

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
debian/scripts/koha-remove