]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mkcephfs: Remove temp dir, not just its contents.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Mon, 25 Apr 2011 17:20:34 +0000 (10:20 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Mon, 25 Apr 2011 17:20:34 +0000 (10:20 -0700)
Also fixes the case where no temp files were created in the dir.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
src/mkcephfs.in

index f0cdcd2208ab9c85780cf5405ec8862424b1c031..5362e94e166f3a10737f68315bed2c1a3c59da2d 100644 (file)
@@ -379,7 +379,7 @@ if [ $allhosts -eq 1 ]; then
     if [ -z "$dir" ]; then
        dir=`mktemp -d -t mkcephfs.XXXXXXXXXX` || exit 1
        echo "temp dir is $dir"
-       trap "rm $dir/* ; exit" INT TERM EXIT
+       trap "rm -rf $dir ; exit" INT TERM EXIT
     fi
 
     # temp dir on remote nodes