| To: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH] 273: don't delete everything if $SCRATCH_MNT isn't set |
| From: | Bryan Schumaker <bjschuma@xxxxxxxxxx> |
| Date: | Mon, 09 Apr 2012 14:36:21 -0400 |
| Cc: | xfs@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120328 Thunderbird/11.0.1 |
The cleanup function is trapped before _require_scratch() is called, and
then expands "rm -rf $SCRATCH_MNT/*" to "rm -rf /*"
Signed-off-by: Bryan Schumaker <bjschuma@xxxxxxxxxx>
---
273 | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/273 b/273
index 2965132..8889f5a 100755
--- a/273
+++ b/273
@@ -35,7 +35,11 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
cd /
- rm -rf $SCRATCH_MNT/* $tmp.*
+ if [ ! -z $SCRATCH_DEV ] && [ ! -z $SCRATCH_MNT ];
+ then
+ rm -rf $SCRATCH_MNT
+ fi
+ rm -rf $tmp.*
_scratch_unmount
}
--
1.7.10
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Internal error XFS_WANT_CORRUPTED_RETURN, Linux 3.0.12 with bulletproof-sync patch, Sean Thomas Caron |
|---|---|
| Next by Date: | Re: detecting case-insensitivity, J. Bruce Fields |
| Previous by Thread: | Internal error XFS_WANT_CORRUPTED_RETURN, Linux 3.0.12 with bulletproof-sync patch, Sean Thomas Caron |
| Next by Thread: | Re: [PATCH] 273: don't delete everything if $SCRATCH_MNT isn't set, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |