From 8de6a6b9eed1ba57cea9c957c3f6d82b7692827a Mon Sep 17 00:00:00 2001 From: Sergey Skripnick Date: Fri, 11 Jul 2014 13:57:19 +0300 Subject: [PATCH] Do not use mktemp for creating rally.conf File created by mktemp does not have world readable permissons, but configuration file should be world-readable. Change-Id: Ie4b7dbdafe96747c679c6b7fa58cd8af3c92078e Closes-Bug: #1340670 --- install_rally.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/install_rally.sh b/install_rally.sh index 7eebdb65de..7150f4f3b3 100755 --- a/install_rally.sh +++ b/install_rally.sh @@ -134,12 +134,8 @@ install_rally() { configure_rally() { mkdir -p ${RALLY_DATABASE_DIR} ${RALLY_CONFIGURATION_DIR} - cp ${TMP}/etc/rally/rally.conf.sample ${RALLY_CONFIGURATION_DIR}/rally.conf - - local tmp=$(mktemp /tmp/rally.conf.XXXXX) - sed 's|#connection=|connection=sqlite:///'${RALLY_DATABASE_DIR}'/rally.sqlite|' ${RALLY_CONFIGURATION_DIR}/rally.conf > ${tmp} - mv ${tmp} ${RALLY_CONFIGURATION_DIR}/rally.conf - + sed 's|#connection=|connection=sqlite:///'${RALLY_DATABASE_DIR}'/rally.sqlite|' \ + ${TMP}/etc/rally/rally.conf.sample > ${RALLY_CONFIGURATION_DIR}/rally.conf rally-manage db recreate chmod -R go+w ${RALLY_DATABASE_DIR} }