ezsystems/ezpublish-legacy — pull request #775 by bdunogier (2013-09-26 15:05:29+00:00)
Title: Fix/ezp 20813 dfscleanup check db nfs

Fixes http://jira.ez.no/browse/EZP-20813

### Situation

The dfscleanup.php script could, if either NFS or DB became unavailable, delete the whole database or the whole NFS folder.

### Changes

This PR adds checks availability of both:
- We check that / exists when a file was reported as missing
- Database error induced by eZDFSFileHandler::exists() will now throw an Exception if a database error, instead of returning a meaningless false

### Testing done
Added interrupts ( `fgets( STDIN )` ) before critical operations, and:
- made NFS unavailable, simulating a mount error
- stopped the database server
The script now aborts, explaining why, when one of those occur.