Check if /etc/swift exists in ring builder

If /etc/swift did not exist, the gluster-swift-gen-builders tool
used to go ahead and create them in current dir.

Change-Id: I1879b959b922de6318ecdff2f16eda12c001ae21
Signed-off-by: Prashanth Pai <ppai@redhat.com>
This commit is contained in:
Prashanth Pai 2014-11-04 15:53:13 +05:30
parent 051e068d1e
commit 260c8ef399
1 changed files with 4 additions and 1 deletions

View File

@ -68,7 +68,10 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
fi
cd /etc/swift
if ! cd "/etc/swift"; then
echo "The path /etc/swift not accessible. Please check if it exists."
exit 1
fi
for builder_file in $builder_files
do