Use $(COMMAND) instead of COMMAND

The usage of $(COMMAND) shoud be preferred. Details can be
found at http://mywiki.wooledge.org/BashFAQ/082.

Change-Id: Ibfe0bdaf08a3c7f0816c64ad2eb4812326e8b10b
This commit is contained in:
Christian Berendt 2014-09-30 15:08:28 +02:00
parent b1cdd3679a
commit a232b9a473
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ export SERVICE_ENDPOINT="http://${HOST_IP}:35357/v2.0"
SERVICE_TENANT_NAME=${SERVICE_TENANT_NAME:-service}
get_id () {
echo `$@ | awk '/ id / { print $4 }'`
echo $($@ | awk '/ id / { print $4 }')
}
# Tenants

View File

@ -128,6 +128,6 @@ create_endpoint () {
}
for i in compute volume image object-store identity ec2 network; do
id=`mysql -h "$MYSQL_HOST" -u "$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE" -ss -e "SELECT id FROM service WHERE type='"$i"';"` || exit 1
id=$(mysql -h "$MYSQL_HOST" -u "$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE" -ss -e "SELECT id FROM service WHERE type='"$i"';") || exit 1
create_endpoint $i $id
done