init-ceph: clean up temp ceph.conf filename on exit

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
This commit is contained in:
Sage Weil 2013-03-22 13:25:43 -07:00
parent 051734522f
commit 6a7ad2eac1

View File

@ -219,6 +219,7 @@ for name in $what; do
unique=`dd if=/dev/urandom bs=16 count=1 2>/dev/null | md5sum | awk '{print $1}'`
if echo $pushed_to | grep -v -q " $host "; then
scp -q $conf $host:/tmp/ceph.conf.$unique
trap "ssh $host rm /tmp/ceph.conf.$unique" EXIT
pushed_to="$pushed_to $host "
fi
cur_conf="/tmp/ceph.conf.$unique"