Fix setup scripts in tools folder

Fix some error when I using these tools.

Change-Id: Icf6b3546741f4e5d3e8b1d550c1462d0ad59e2ca
This commit is contained in:
Ethan Lynn 2015-04-09 00:22:29 +08:00
parent 33d2e4eee2
commit a672e60813
3 changed files with 7 additions and 7 deletions

View File

@ -73,7 +73,7 @@ basic_configuration() {
if echo $conf_path | grep ".conf$" >/dev/null 2>&1
then
iniset $target DEFAULT auth_encryption_key `hexdump -n 16 -v -e '/1 "%02x"' /dev/random`
iniset $target database connection "mysql://senlin:senlin@localhost/senlin"
iniset $target database connection "mysql://senlin:senlin@localhost/senlin?charset=utf8"
BRIDGE_IP=127.0.0.1

View File

@ -1,14 +1,14 @@
#!/bin/bash
MYSQL_ROOT_PW=openstack
MYSQL_SENLIN_PW=openstack
MYSQL_ROOT_PW=${MYSQL_ROOT_PW:-openstack}
MYSQL_SENLIN_PW=${MYSQL_SENLIN_PW:-openstack}
echo "Recreating 'senlin' database."
cat << EOF | mysql -u root --password=${MYSQL_ROOT_PW}
DROP DATABASE senlin;
DROP DATABASE IF EXISTS senlin;
CREATE DATABASE senlin DEFAULT CHARACTER SET utf8;
GRANT ALL ON senlin.* TO 'root'@'localhost' IDENTIFIED BY '${MYSQL_SENLIN_PW}';
GRANT ALL ON senlin.* TO 'root'@'%' IDENTIFIED BY '${MYSQL_SENLIN_PW}';
GRANT ALL ON senlin.* TO 'senlin'@'localhost' IDENTIFIED BY '${MYSQL_SENLIN_PW}';
GRANT ALL ON senlin.* TO 'senlin'@'%' IDENTIFIED BY '${MYSQL_SENLIN_PW}';
flush privileges;
EOF

View File

@ -1,6 +1,6 @@
#!/bin/bash
if [ $# -ne 2 ]; then
if [ $# -ne 1 ]; then
echo "Usage: `basename $0` <HOST_IP>"
exit -1
fi