If you accidentally delete one of the site configuration files (for example, the Apache conf file) for an instance, then run koha-remove to finish the removal process, the script will die when it tries to rm the nonexistent file, leaving any steps after that in the removal process undone.
Created attachment 5825 [details] [review] Bug 6997: Koha-remove leaves system in inconsistent state If you accidentally delete one of the files that koha-remove is supposed to remove, when koha-remove reaches that point in the script, it will die, leaving later removal steps undone. This patch fixes the problem by checking for the existence of each file prior to deleting it, so that short of an actual problem with removing the file, the script can continue. Note that the fix for bug 6929 is also needed to prevent any problems with stopping Zebra from killing koha-remove.
Created attachment 6396 [details] [review] Bug 6997: Koha-remove leaves system in inconsistent state Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Handles all the cases, as far as I can tell, wrapping in conditional checks. Only affects packages in a very specific case, so little chance of regression anywhere in the system. marking passed QA
patch pushed, please test (Note i haven't tested this patch myself, reading it seems OK though)