]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mkcephfs.in: cleanup rdir in MON case
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 27 Mar 2013 15:03:20 +0000 (16:03 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 27 Mar 2013 15:03:20 +0000 (16:03 +0100)
Remove $rdir in MON case of 'mkcephfs -a' as soon as it's no
longer needed.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/mkcephfs.in

index 97851ee7bffddf977247c5950dff64229e20387f..92d657259ef703d2165c5accf53614d7f267ffa1 100644 (file)
@@ -505,6 +505,7 @@ if [ $allhosts -eq 1 ]; then
        if [ -n "$ssh" ]; then
            echo collecting $name key
            scp -q $host:$rdir/key.$name $dir
+           #cleanup no longer need rdir
            do_cmd "rm -r $rdir"
        fi
     done
@@ -542,6 +543,11 @@ if [ $allhosts -eq 1 ]; then
        fi
        
        do_root_cmd "$0 -d $rdir --init-daemon $name"
+
+       if [ -n "$ssh" ]; then
+           #cleanup no longer need rdir
+           do_cmd "rm -r $rdir"
+       fi
     done
 
     # admin keyring